The Republican-controlled chamber cleared Mnuchin 53-47, largely along party lines. He is the latest in a string of Trump Cabinet nominees who Democrats have protested fiercely.
Mnuchin, 54, drew Democratic attacks for the foreclosure history of his firm, OneWest Bank, after the financial crisis and for serving as a partner at Goldman Sachs. Critics alleged that Mnuchin's past showed he could not live up to Trump's campaign pledges to protect Americans from powerful institutions.
Mnuchin will oversee the Treasury Department in an administration seeking swift changes to tax and trade policies. Trump is pushing for broad income and corporate tax cuts, while he has abandoned the Trans-Pacific Partnership and pledged to renegotiate the North American Free Trade Agreement.
Mnuchin adds another Goldman veteran to a key spot in Trump's administration, along with economic advisor Gary Cohn and chief strategist Steve Bannon. Perceptions of a pro-business administration that will cut taxes and roll back regulations have contributed to stocks climbing since Trump's election in November.
Other former bankers are expected to join Mnuchin in key Treasury spots.
Some lawmakers accused Trump of hypocrisy for choosing former Goldman employees for key posts after his campaign rhetoric toward the bank and other financial institutions. He accused Republican primary opponent Sen. Ted Cruz, R-Texas, and general election rival Hillary Clinton of being beholden to Goldman and corporate special interests.
Mnuchin previously served as finance chairman for Trump's presidential campaign and helped to finance Hollywood films. Republicans supporting Mnuchin defended him against attacks in his confirmation hearing, noting that he had not broken any laws and that prominent Wall Street veterans served in previous administrations.
In the hearing, Mnuchin disputed OneWest's alleged aggressive foreclosure practices at OneWest.
"Since I was first nominated to serve as Treasury Secretary, I have been maligned as taking advantage of others' hardships in order to earn a buck. Nothing could be further from the truth," he told senators.
In his hearing, Mnuchin downplayed analyses that Trump's tax cuts could add trillions to the national debt, saying that "we think the way to reduce the debt is by economic growth." He previously told CNBC in November that there would be no absolute tax cut for the upper class.
Critics have said that Trump's tax plan will help the wealthy more than the middle class.
Democratic Sen. Joe Manchin of West Virginia was the only Democrat to vote for Mnuchin. Manchin, who serves in a state that Trump overwhelmingly won, has broken with his party more often than his colleagues on Trump Cabinet votes.
Mnuchin becomes just the 10th Trump Cabinet nominee confirmed so far. Republicans have called foul on the pace of the confirmations, as Democrats, lacking enough votes to block on their own, have used Senate procedures to delay votes on some Trump nominees.