The Senate voted 78-22, in a rare bipartisan show of support for one of Obama's high-profile initiatives. With the House of Representatives approving the legislation on Wednesday, the measure now goes to Obama to sign into law.
Ten Senate Democrats and 12 Republicans voted no.
Obama thanked Congress for the speed in which it acted to back the plan, which he announced on Sept. 10, and said the strong bipartisan support showed Americans were united in the fight against Islamic State.
"When you harm our citizens, when you threaten the United States, when you threaten our allies, it doesn't divide us, it unites us," he said at the White House after the vote.
Obama also said that more than 40 countries, including Arab states, had joined the coalition that will battle the militants, and that France would join in air strikes against Islamic State in Iraq.
The plan to arm and train the rebels was written as an amendment to a spending bill that would keep the U.S. government operating on Oct. 1, the start of a new fiscal year.
Some lawmakers objected to including a "war vote" in a fiscal measure.
Others worried that getting involved with the rebels would lead to broader involvement in Iraq or in Syria's civil war or that any arms given to them might fall into the wrong hands and end up being used against U.S. forces or their allies.
Republican Senator Susan Collins of Maine voted for the spending bill, but said Congress should have engaged in a full debate over the overall plan to stop Islamic State.
A member of the Senate Intelligence Committee, Collins said she had not been given enough details, including information about the moderate fighters.
"I'm concerned that the fighters that we train will be focused on what really motivates them, which is removing (Syrian President Bashar al-) Assad, not fighting ISIS," she told Reuters, using an alternate name for the militant group.
The rebels have been fighting a three-year civil war against Assad, who has held on to power despite the rise of the Islamic State group and a covert U.S. effort backing the moderate fighters.
If Obama signs it into law as expected, the authority to train and arm the rebels would expire on Dec. 11.
The legislation is likely just the start of a debate over what longer-term role the U.S. military should have in battling a group that has killed thousands in Iraq and Syria, declared war on the West and is held responsible for beheading two American journalists.
After the vote, members of Congress left town to campaign in their home states for the Nov. 4 elections. When they come back for a likely short, end-of-year session, they are expected to return to the question of battling Islamic State militants.