WASHINGTON—The Senate voted along party lines to raise the U.S. borrowing limit into December, after Democrats struck a short-term agreement with Republican leaders that averted a looming default for now but sets up another showdown within months.