The last-minute deal also requires income verification for those seeking health coverage through Obamacare and provides reimbursement for federal employees who were furloughed.
The Senate passed the package 81-18, with Sen. Orrin Hatch backing the compromise while Sen. Mike Lee opposed it.
The House approved it 285 to 144. Rep. Jim Matheson, like all other Democrats, voted yes, while Utah's Republican Reps. Rob Bishop, Jason Chaffetz and Chris Stewart voted no.
The public face of the shutdown belonged to Lee, R-Utah, and Sen. Ted Cruz, R-Tex., because of their vow to oppose any budget compromise that funds the Affordable Care Act. This latest deal doesn't impact funding for the health law, known as Obamacare, and Republicans got nearly nothing out of the deal, leaving some fuming over the hard-line tactics.
"When Republicans control only one-half of one-third of the federal government, we have to understand what is achievable and what is not," Hatch, R-Utah, said in his strongest rebuke yet of the Cruz-Lee plan. "Too many were led to believe we could accomplish something that was never possible namely defunding Obamacare through a government shutdown."
Sen. John McCain, R-Ariz., called the government closure "one of the most shameful" chapters in his 26-year Senate career, while Sen. Kelly Ayotte, R-N.H., said she agreed with ending funding for Obamacare but disliked the Cruz-Lee plan.
"Shutting down the government was a stupid strategy," she said on the Senate floor. "I hope we never do this again."
Lee isn't deterred saying he isn't willing to give up the larger fight even if he lost this battle.
"Obamacare wasn't enacted overnight and it won't be repealed over night," he said on the Senate floor. "This is not over. We have an obligation to fight for the American people and I do not intend to let the American people down."
He also defended his failed strategy, saying, "It is always worth it to do the right thing."
The first-term senator pitted those who opposed him, such as Hatch and McCain, as "the Washington establishment" ignoring the will of the American people, even though polls showed that the public didn't side with Lee.
The short-term nature of the deal itself gives Lee and his supporters another chance to attack the health law.
The compromise sets up a budget conference that will attempt to strike a longer-term spending deal by mid-December, with the government running out of money by mid-January.
Rep. Peter King, a New York Republican who has been a staunch critic of the Cruz-Lee plan, said, given that new deadline, the GOP should avoid letting the party's right flank drive the debate.
"That's why I'm saying let's not let Cruz get ahead on this," King told The Salt Lake Tribune. "We have to stop it. He got a free ride this time. We have to derail him."
Sen. Chuck Schumer, D-N.Y., said even though America spent "two weeks risking extreme danger" at least it forged a compromise between the sides that he hopes sticks.
"If there is a silver lining in this cloud," Schumer said, "it's that hopefully this debacle means that the power of those that favor confrontation has peaked and we can start legislating again, in a bipartisan way, without this dangerous brinkmanship."
Rep. Jim Matheson, too, said it's time to move past the stalemate.
"I hope people learn from this experience," said the Utah Democrat. "This situation is irresponsible. It hurt so many people in our country and it shouldn't have happened. I'm glad it is resolved today and I hope we can learn from that and behave in a better way going forward."
And Matheson, an opponent of Obamacare, has a different opinion than Lee. He believes the shutdown may end the persistent Republican attempts to dismantle the health law, shifting the conversation to fixing flawed portions.
Obama heralded the breakthrough in brief comments to reporters and immediately asked Congress to shift its attention to immigration reform and a long-stalled farm bill.
"I want to thank the leadership for coming together and getting this done," he said. "Hopefully, next time, it won't be in the 11th hour. One of the things that I said throughout this process is we've got to get out of the habit of governing by crisis."
The White House said there were no winners in the shutdown fight, though Republicans essentially capitulated to most of the Democrats' demands and the Affordable Care Act escaped nearly untouched. The GOP's lone win out of the deal was a concession that people receiving subsidies to buy health insurance would have to prove they're eligible.
"If they put on the verification of income on Obamacare, that's a win," said Rep. Rob Bishop, R-Utah. "I mean, these are not the same thing as delaying the damn thing, but it's a win."
House Speaker John Boehner, R-Ohio, who had faced a fractured caucus during the budget debate, says the effort wasn't all for naught. But he told the Cincinnati radio station WLW that the GOP clearly lost.
"We fought the good fight," Boehner said. "We just didn't win."