The two sides were tied at 3-3 after extra time before the Iraqis came out on top 5-4 from the spot.
Iraq went ahead for the second time three minutes before the break when Farhan Shakor pounced in the area.
Korea were level again early in the second half thanks to Lee Gwanghun's near-post header.
With the game all square after normal time, Iraq thought that they had won when Shakor bundled the ball in with just a minute of extra time remaining.
However, Korea made it 3-3 in the final seconds as Jung Hyuncheol's long-range strike took a deflection before finding the net.
Both teams missed early penalties in the shootout, but Lee's saved kick allowed Shakor to bury the winning penalty.