Ms Levine had been serving as Pennsylvania’s top health official since 2017, and emerged as the public face of the state’s response to the coronavirus pandemic. She is expected to oversee Health and Human Services offices and programmes across the US.
President Joe Biden cited Ms Levine’s experience when he nominated her in January.
Ms Levine “will bring the steady leadership and essential expertise we need to get people through this pandemic — no matter their zip code, race, religion, sexual orientation, gender identity or disability”, Mr Biden said.
Transgender-rights activists, as well as politicians, have hailed Ms Levine’s appointment as a historic breakthrough.
Few trans people have ever held high-level offices at the federal or state level.
However, the confirmation vote came at a challenging moment for the transgender-rights movement as legislatures across the US, primarily those under Republican control, are considering an unprecedented wave of bills targeting trans young people.
One type of bill, introduced in at least 25 states, seeks to ban trans girls and young women from participating in female scholastic sports.
One such measure already has been signed into law by Mississippi governor Tate Reeves, and similar measures have been sent to the governors in Tennessee, Arkansas and South Dakota.
Another variety of bill, introduced in at least 17 states, seeks to outlaw or restrict certain types of medical care for transgender youths. None of these measures has yet won final approval.
Senator Rand Paul confronted Ms Levine about medical treatments for transgender young people, include hormone treatment and puberty blockers, during her confirmation hearing on February 25.
“Do you believe that minors are capable of making such a life-changing decision as changing one’s sex?” Mr Paul asked.
Ms Levine replied that transgender medicine “is a very complex and nuanced field with robust research and standards of care” and said she would welcome discussing the issues with him.
In the past, Ms Levine has asserted that hormone therapy and puberty-blocking drugs can be valuable medical tools in sparing some transgender youth from mental distress and possible suicide risk.