After the death of FDR in 1945, Vice President Truman became president. However his popularity waned against many sides in the Democratic party and the country. That didn't stop his re-nomination however.
Republicans once again nominated Thomas E. Dewey, who was the Governor of New York at the time. He represented the liberal-wing of the GOP which actually existed back then believe it or not. However many fiscal conservatives hated their support for the expansion of Social Security, and other government programs.
With impressive steps forwards being enacted for civil rights infuriated the Southern Democrats. South Carolina Governor Strom Thurmond stormed out of the convention and started the State's Rights Democratic Party. Oddly enough, the party knowingly only put themselves on the ballot in Southern States which would make it impossible to win a general election. They hoped to split the majority and push the verdict to the House of Representatives. Even if they didn't win, they hoped to send a message to "regular" Democrats that they needed to support the south.
While Dewey came out ahead in the early polls, he took a rather boring and safe campaign approach. Truman attacked him from all sides, and hope to give it his all. Truman slowly gained support and surprisingly didn't lose much to defecting liberals or southern dixiecrats. Still many newspapers printed out articles predicting an supreme victory for Dewey.
Truman shocked everyone the next morning by winning the popular vote and gaining most of the states. He ended up with 303 electoral votes versus Dewey's 189. Thurmond only managed to snag 39 which put a justified end to his national plans.