With Argentina needing to beat Nigeria on Tuesday in St Petersburg to have a chance of qualifying for the last 16 at Russia 2018, the forward gave his side a 14th-minute lead.
Ever Banega's lofted throughball was ideally placed for Messi to impressively control and hammer home a right-footed drive to put Jorge Sampaoli's men in front.
Messi had failed to score in Argentina's two previous Group D games, missing a penalty in a 1-1 draw against Iceland and proving toothless as his side were thumped 3-0 by Croatia.