The Senate vote removed one of the many roadblocks the administration faces as it tries to empty the internationally condemned prison by January.
The measure, included in a $42.8bn bill to fund the Homeland Security Department, passed the House of Representatives last week and now heads to the White House for President Obama to sign into law.
Mr Obama ordered the detention camp closed on his second day in office.
However, his administration officials have run into numerous legal, political and diplomatic hurdles.
Approximately 220 inmates remain at the prison, which was opened after the terrorist attack in New York in September 2001.
Some of the detainees who do not face criminal charges may be tried military tribunals, while others who have been cleared of any wrongdoing could be resettled in other countries.
The US Justice Department sent two detainees to Ireland for resettlement in September.
