Republicans on the committee broke with protocol and pushed Mnuchin's vote to the Senate floor after a boycott by Democrats.
Democrats were unable to block Mnuchin, as they are outnumbered by a largely unified bloc of Republicans, 52-48.
Republican supporters of Mnuchin, who served as finance chairman for Trump's presidential campaign, say his long career in finance shows he has the strong management and decisionmaking skills necessary to run the department.
Mnuchin's confirmation vote was contentious, but far less dramatic and the criticism more muted than with Trump's Education Secretary Betsy DeVos and Attorney General Jeff Sessions. Democrat Joe Manchin was the only crossover vote. He was confirmed by a mostly party-line vote of 53-47.
The Senate also confirmed a less divisive nominee Monday evening, physician David Shulkin, to be secretary of the Department of Veterans Affairs.
The lack of bipartisan support for a Treasury secretary was highly unusual, reports the Wall Street Journal, which notes that Mnuchin, who served as Trump's campaign finance chairman, now has an extremely busy agenda that includes advancing Trump's plans for changing the tax code and boosting economic growth. That vote was unanimous.
Other former bankers are expected to join Mnuchin in key Treasury spots.
During a long debate over Mnuchin's credentials, Democrats argued that Mnuchin's experience on Wall Street exemplified corporate malpractice that led to the 2008 financial crisis. They raised concerns about his role as chief executive of OneWest Bank during the home mortgage crisis.
Trump said Mnuchin would be a champion of tax payers, would fight for the middle class and ensure that the Wall Street plays by the rules. Senator Debbie Stabenow of MI said: "Mr. Mnuchin has made his career profiting from the misfortunes of working people".
Mnuchin apparently made a last-minute disclosure revealing millions more in financial assets, including $95 million worth of real estate and Dune Capital International, an investment fund incorporated in Cayman, as well as several other investment funds.
Shulkin, 57, a former Obama administration official, has been the VA's top health official since 2015.