The bill, which passed 92 to 8, also includes a two-year extension of a popular children's health insurance program.
The issue of payments to Medicare providers has been a thorny issue for years. Senate Finance Committee Chairman Orrin Hatch of Utah called passage of the bill a "major, major accomplishment."
"Tonight, the Senate is voting to retire the outdated, inefficiency-rewarding, common sense-defying Medicare reimbursement system," said Sen. Ron Wyden of Oregon, the top Democrat on the Finance Committee just before the final vote.
The House approved the same bill overwhelmingly more than two weeks ago and President Barack Obama is expected to sign it. Senate passage came just hours before cuts to physicians would have taken place since the last temporary "doc fix" had already expired.
Some conservative senators, including Republican presidential candidate Ted Cruz of Texas, balked at the more than $200 billion price of the bill and pushed an amendment to have the costs offset.
The bill, "institutionalizes and expands Obamacare policies that harm patients and their doctors while adding roughly half a trillion dollars to our long-term debt within two decades," Cruz said in a statement. "Any deal should be fully paid for and include significant and structural reforms to Medicare."
But that amendment was defeated, as were several others from each party that came up for votes.
Earlier, House Speaker John Boehner of Ohio warned the Senate not to change the bill.
"Unless the Senate passes the House-passed 'doc fix,' significant cuts to physicians' payments will begin tomorrow," Boehner said. "We urge the Senate to approve the House-passed bill without delay."
Cruz voted against the bill, as did Sen. Marco Rubio of Florida, another Republican running for president.
GOP presidential contender Sen. Rand Paul of Kentucky voted for the bill.