Messi, who came on as a substitute in recent World Cup qualifiers against Colombia and Ecuador, was given a place in the starting line-up and gave Argentina a 15th minute lead with a left-foot shot from outside the penalty area.
Messi, scoring his third hat-trick for his country, provided the cross for Augusto Fernandez to head in the second in the 35th minute before converting a penalty himself four minutes later.
He completed his hat-trick four minutes after halftime when Ezequiel Lavezzi produced a low cross from the right and he casually side-footed the ball in from 12 metres after being left completely unmarked.
Apart from Messi, coach Alejandro Sabella fielded a largely experimental line-up for Friday evening's match in Guatemala City's Mateo Flores stadium.
Messi, whose previous hat-tricks were against Switzerland and Brazil last year, was substituted in the 67th minute after taking his tally of international goals to 35, which Argentine media said was one more than Diego Maradona's total and put him level with Hernan Crespo as the team's second highest scorer.
Gabriel Batitusta holds the record with 56 goals.
"That was the least important thing," Messi told TyC Sports when he was asked about overtaking Maradona's tally. "We wanted to play well in this friendly. The team's attitude was right."
Argentina's next match is a friendly away to Italy on Aug. 14.