WASHINGTON—The Senate narrowly confirmed Betsy DeVos as education secretary Tuesday, after Vice President Mike Pence cast a historic tiebreaking vote to rescue one of the Trump administration’s most-polarizing cabinet picks.

The Senate approved Mrs. DeVos in a 51-50 vote, with only Republicans voting yes. All 46 Democrats, the chamber’s two independents and two Republicans—Susan Collins of Maine and Lisa Murkowski of Alaska—opposed her. The vote marked the first time a vice president broke a tie to confirm a cabinet secretary,...