The bill is the most significant gun measure to clear Congress in nearly three decades, though it falls short of more restrictive gun control proposals that Democrats favor.