Forty-eight Democrats joined Republicans in voting for the bill, which is the first to pass the newly elected House.