Thomas Dewey lost to Harry Truman in an upset in 1948 despite his comfortable lead in the polls. Dewey, the darling of the intelligentsia, coasted against an embattled populist incumbent who campaigned vigorously on his whistle-stop tour. The election dynamics today are remarkably similar.
https://www.history.com/news/dewey-defeats-truman-election-headline-gaffe