The vote was 231-188 with Democrats criticizing Republicans' inability to complete the dozen spending bills for the current fiscal year and relying on a third stopgap bill since the year's October 1 start.
The Senate was expected to vote on the short-term legislation late last night.
Rep. Nita Lowey, D-N.Y., called the result "an epic failure of governing," adding "the Republican majority has made a complete mess of the basics of governing."
Each of those items is sure to test the unity that Republicans are enjoying now.
More From This Section
"The more stuff that's pushed into January, it's unfortunate because we'll have to do this all over again," said Republican Sen. John Thune of South Dakota. "But at some point we've got to make the hard decisions."
The stopgap legislation would keep the government from closing down at midnight Friday. It has traversed a tortured path, encountering resistance from the GOP's most ardent allies of the military, as well as opposition from Democrats who demanded but were denied a vote on giving immigrants brought to the country as children and in the country illegally an opportunity to become citizens.
"They embody the best in our nation: patriotism, hard work, perseverance," House Democratic Leader Nancy Pelosi of California told the chamber's Rules Committee on Thursday. "We should not leave them to celebrate the holidays in fear."
Trump and Republicans are pushing for additional border security and other immigration steps in exchange.