The House followed suit shortly afterward, voting 285 to 144 to approve the bill. One hundred and forty-four Republicans opposed the vote. Eighty-seven other Republicans joined all 198 Democrats casting votes in favor of the measure.
Obama, speaking from the White House Wednesday night after the Senate's votes, said the protracted impasse over government funding has eroded public support and effectively stalled all other legislation.
"There a lot of work ahead of us, including the need to earn back the trust of the American people that has been lost of the last few weeks," Obama said.
He added that he was hopeful Congress could complete work on immigration reform legislation, a farm bill and a larger budget deal before the end of the year.
"There's no reason why we can't work on these issues at hand, why we can't disagree between the parties while still being agreeable and make sure we're not inflicting harm on the American people," Obama said.
The compromise was completed by Senate Majority Leader Harry Reid, D-Nev., and Minority Leader Mitch McConnell, R-Ky., midday on Wednesday after a House effort to offer a counter-proposal nearly derailed Senate negotiations the day before.
The final agreement makes only minor changes to President Obama's health care law by requiring income verification for people receiving health care subsidies from the government. It also authorizes a bipartisan committee of negotiators to hammer out a long-term budget deal by Dec. 13, before government funding runs out again in January.
After weeks of legislative ping-pong and last-minute, closed-door negotiations, Reid shared a sentiment many across the country are feeling.
"I'm tired," Reid said at a news conference Wednesday after the Senate vote.
Reid and Democratic leaders Wednesday said they were pleased a deal was reached but warned that it should not be cause for excessive celebration because thousands of federal employees and the American economy took a hit during the shutdown.
"It will be some time before we realize the effects of what we've just done, but the shutdown has hurt our economy to a significant degree," Reid said. "But we were able to work it out."
Republicans in the House, though they resisted it, rallied around House Speaker John Boehner, R-Ohio, Wednesday as he announced his willingness to move forward with the Senate bill.
One member leaving a House Republican Conference meeting Wednesday afternoon said Boehner received a standing ovation from the group. Another told ABC News that when the leadership asked whether any members objected to their plan to move forward with a vote on the Senate bill, none objected.
Boehner left without making comment, but shook his fist before cameras in a display of success.