Argentina appeared to be heading to their first defeat against Mexico since 2004 after a first half penalty from Javier Hernandez and a second half strike from Hector Herrera fired “El Tri” into a 2-0 lead.
But with the clock ticking down a flurry of attacking substitutions from Argentina coach Gerardo Martino turned the match in favour of the two-time world champions in a dramatic finale.
Ezequiel Lavezzi burst into the penalty area to cut back for Manchester City striker Sergio Aguero to tap in from close range on 85 minutes to make it 2-1.
Then in the 89th minute Aguero picked out Messi with a clever quick free-kick inside the area.
The Barcelona superstar controlled on his chest and then jabbed a low shot past Mexico goalkeeper Moises Munoz to level.
Messi’s goal was the final act of an entertaining encounter played in front of 82,559 at the Arlington, Texas home of the Dallas Cowboys NFL side.
However for long periods both sides looked uncomfortable with the makeshift playing surface, a layer of temporary grass laid on top of artificial turf used for American football games.
Mexico took the lead on 19 minutes through Hernandez’s penalty after Manchester City defender Nicolas Otamendi upended Raul Jimenez in the box.
Munoz made a series of superb saves to deny Argentina a goal before in the 70th minute Hector Herrera made it 2-0 with a thumping strike from the edge of the area after a fine Mexico counter attack.
Mexico appeared to be heading for a victory but Aguero and Messi’s late double strike denied them.
Messi’s equaliser was his 49th goal in his 105th international, leaving him seven goals behind Argentina’s all-time leading goalscorer Gabriel Batistuta on 56.