The 60-40 vote passed with the support of nearly all of the chamber's Republicans and eight Democrats, who unsuccessfully sought to tie government funding to health subsidies that are due to expire at the end of the year.
While the agreement sets up a December vote on those subsidies, which benefit 24 million Americans, it does not guarantee they will continue.
The deal would restore funding for federal agencies that politicians allowed to expire on October 1 and would stall President Donald Trump's campaign to downsize the federal workforce, preventing any layoffs until January 30.
It next heads to the Republican-controlled House of Representatives, where Speaker Mike Johnson has said he would like to pass it as soon as Wednesday and send it on to Trump to sign into law.
"We have to do this as quickly as possible," Johnson said.
Trump has called the deal to reopen the government "very good."
The deal would extend funding through January 30, leaving the federal government for now on a path to keep adding about $US1.8 trillion a year to its $US38 trillion in debt.
Coming a week after Democrats won high-profile elections in New Jersey, Virginia and elected a democratic socialist as the next mayor of New York City, the deal has provoked anger among many Democrats who note there is no guarantee that the Republican-controlled Senate or House would agree to extend the health insurance subsidies.
"We wish we could do more," said Senator Dick Durbin of Illinois, the chamber's No.2 Democrat.
"The government shutting down seemed to be an opportunity to lead us to better policy. It didn't work."
Trump has unilaterally cancelled billions of dollars in spending and trimmed federal payrolls by hundreds of thousands of workers.
Earlier, the US president demanded air traffic controllers return to work as travellers endured another day of flight cancellations, which the administration ordered to manage staff shortages during the shutdown.
Threatening to curtail the pay of any controller who did not go back, Trump said he would award those who have not taken time off during the shutdown $US10,000 bonuses and would welcome the resignations of the rest.
"All Air Traffic Controllers must get back to work, NOW!!! Anyone who doesn't will be substantially 'docked,'" Trump wrote on social media. "REPORT TO WORK IMMEDIATELY."
The 41-day shutdown has forced 13,000 air traffic controllers and 50,000 Transportation Security Administration agents to work without pay. Some are absent as they work second jobs or cannot afford child care.
Airlines cancelled nearly 2000 flights on Monday, the fourth consecutive day cancellations have topped 1000 as government flight cuts and air traffic staffing absences continue to wreak havoc with aviation.
The Federal Aviation Administration said it was suspending general aviation traffic at 12 airports with air traffic control staffing issues, including Chicago O'Hare and Reagan Washington National.Â
Even before the shutdown, the FAA was about 3500 air traffic controllers short of targeted staffing levels. Many had been working mandatory overtime and six-day weeks.
with AP