The Barcelona star’s late, late winner kept La Albiceleste top of Group F on six points and lefts the Iranians stuck on one.
Prior to Messi’s timely intervention, the match had been a tale of domination and frustration for Alejandro Sabella’s side, with a goal remaining elusive due to Iran’s determined defending.
Gonzalo Higuain had been promoted to starting line-up and started the game well, setting up first Angel Di Maria and then Sergio Aguero for efforts on goal, the second of which forced an acrobatic save from Alireza Haghighi.
Messi again looked subdued during the opening 45, with his only attempt coming on 33 minutes when he curled a free-kick just over the top right-hand corner.
The Argentina captain then set up his team’s best chance of the half four minutes later, crossing for Ezequiel Garay, who headed wastefully over from inside the six yard box.
Iran, meanwhile, spent much of the match with all 11 players behind the ball, although they did offer a threat at set pieces.
They could, in fact, have gone into the interval 1-0 only for Jalal Hosseini to head inches over after rising highest to meet Ashkan Dejagah’s outswinging corner.
Carlos Queiroz’s side also carved out a golden opportunity at the start of the second half, when Reza Ghoochannejad’s header forced an excellent reflex stop from Sergio Romero after tremendous build-up play by Masoud Shojaei.
Romero was again called into action midway through the half, pulling off a magnificent one-handed tip-over after Dejagah had beaten Pablo Zabaleta to bullet a header towards goal.
Argentina remained the game’s dominant force, though, and came close to breaking the deadlock on the hour-mark when Messi surged forward from midfield and curled a left-foot shot just wide of Haghighi’s left-hand post.
However, their efforts became increasingly desperate as Iran’s defence held firm, with Marcos Rojo’s wayward long-range effort typical of their speculative late attempts.
Indeed, Iran could have snatched a win at the death, with Ghoochannejad racing through and firing in a left-foot shot that was heading for the corner before Romero got across to tip wide.
Then, however, Messi provided yet another reminder of his genius. Picking up the ball in a seemingly unthreatening position wide on the right, he cut inside and, from 25 yards, curled an unstoppable left-foot shot into the far corner of the net. With 91 minutes showing on the clock, Argentina – thanks again to their incomparable captain – had won.