The Koreans appeared to be heading out of the tournament for much of the game but Hwang Hee-chan's 91st-minute winner lifted them to second in Group H, behind Portugal.
They faced a nervous wait on the pitch for Uruguay's match against Ghana to finish. The South Americans won 2-0 but were unable to find the one extra goal they needed, going out on goals scored.