After Ghana raced into a 2-0 lead, Cho Gue-sung scored twice in three second-half minutes to haul South Korea level before Mohammed Kudus' winner fired Ghana to their first victory at the World Cup in a dozen years.
South Korea remain on one point in Group H, while Ghana's victory takes them into second, with Portugal and Uruguay to face off in Monday's final fixture in Lusail.
Both sides made three changes from their opening matches, and it was South Korea who started the game on the front foot.
South Korea - with captain Son Heung-min again wearing a protective facemask - registered seven corners in 18 minutes as Ghana were unable to gain control of the game.
But, despite their dominance, Paulo Bento's side failed to muster a significant strike, and midway through the opening period, Southampton defender Mohammed Salisu scored against the run of play.
Crystal Palace's Jordan Ayew was the creator as South Korea made a hash of clearing his free-kick, and Salisu thrashed home on the turn.
Ghana's celebrations were temporarily cut short as replays showed Ayew's set-piece struck brother Andre Ayew's hand.
However, a VAR check followed, before Premier League referee Anthony Taylor was told to let the goal stand.
Ghana were suddenly in charge and, 10 minutes later, Kudus doubled their advantage when he guided Jordan Ayew's pinpoint free-kick into the back of the net.
South Korea looked down and out at the interval, but Cho provided them with a lifeline when he turned in substitute Lee Kang-in's cross shortly before the hour mark.
And, just three minutes later, Cho stunned Ghana when he scored his second of the night with a powerful header past goalkeeper Lawrence Ati-Zigi.
South Korea had their tails up, but they were on level terms for only seven minutes after Kudus completed his brace.
Inaki Williams fluffed Gideon Mensah's pullback, but the ball fell kindly to Kudus, who swept home to score the game's third goal in 10 wild and wacky minutes.
South Korea went in search of an equaliser, with Ati-Zigi turning away Kang-in's free-kick, before Salisu hacked Kim Jin-su's effort off the line.
But Ghana survived 10 minutes of stoppage time to deny South Korea a second comeback, and secure their first win on the World Cup stage since beating the United States in the last 16 in South Africa in 2010.
A furious Bento was shown a red card by referee Taylor at the final whistle, and will miss his side's final group game against his home country Portugal.