Subbing in during the 70th minute on Tuesday (Wednesday AEST), Messi's first touch set up Lautaro Martinez, who was taken out by Iceland goalkeeper Elias Olafsson.
Skipper Messi buried the spot kick into the roof of the net, doubling Argentina's lead with the 117th international goal of his career.
The 38-year-old missed Argentina's first friendly against Honduras on Saturday as he continued his recovery from left hamstring soreness which forced him to prematurely exit Inter Miami's final match before the World Cup break on May 24.
With his World Cup status seemingly certain, Messi is set to simultaneously set a record alongside Cristiano Ronaldo when he appears in his sixth career World Cup.
No one has played in more World Cup matches than Messi, who has appeared in 26, one more than Germany's Lothar Matthaus. Messi's 13 career World Cup goals are tied for fourth-most, three behind German record-holder Miroslav Klose.
Valentin Barco and Thiago Almeda were the other goalscorers in Auburn for the defending world champions.
Argentina's Group J schedule features matches against Algeria on June 16, Austria on June 22 and Jordan on June 27.
Graham Arnold's Iraq lost 2-0 to Venezuela in their final warm-up match in Illinois.
Cristian Casseres opened the scoring for the South Americans on 17 minutes, while they doubled their lead immediately after interval through Jesus Ramirez.
Iraq return to the World Cup finals for the first time since their only appearance 40 years ago, and will begin their Group I campaign against Norway on June 17 before facing France and Senegal.
Venezuela remain the only South American nation to never qualify for the World Cup finals.
Elsewhere, Saudi Arabia were held to a goalless draw by Senegal and the Democratic Republic of Congo wrapped up with a 2-1 defeat by Chile in a behind-closed-doors friendly in Orleans.
The match was switched to the French city and played without spectators after authorities in Cadiz, Spain, the original host venue, called it off citing public health concerns linked to an Ebola outbreak in the central African nation.