Argentina had been thankful to three fine second-half saves from goalkeeper Sergio Romero just to be level heading into stoppage time, while Iran had also had a strong penalty appeal waved away when Pablo Zabaleta appeared to foul Ashkan Dejagah inside the area.
However, despite having endured a quiet game by his standards, Messi produced a moment of magic when his side needed it most to register his second goal of the tournament.
Argentina now lead Group F with maximum points from two games and will be confirmed as group winners should Saturday's late game between Nigeria and Bosnia Hercegovina fail to produce a winner.
However, after another underwhelming performance, Messi assured there is more still to come from his side