The Senate confirmed Janet L. Yellen, a labor economist and former Federal Reserve chair, to be Treasury secretary on Monday, putting in place a key lieutenant to President Biden at a perilous economic moment, as the new administration tries to revive an economy that has been battered by the coronavirus pandemic.

By a vote of 84 to 15, the Senate confirmed Ms. Yellen, making her the first woman to hold the top job at Treasury in its 232-year history. Her quick bipartisan confirmation underscored the support she has from both Republicans and Democrats given her previous stint as Fed chair from 2014 to 2018.

Ms. Yellen now faces a new and considerable challenge. As Treasury secretary, she will be responsible for helping Mr. Biden prepare the $1.9 trillion stimulus package he has proposed, steer it through Congress and — if it is approved — oversee the deployment of trillions of dollars of relief money.