Messi put Argentina ahead with a 34th-minute penalty after goalkeeper Dominik Livakovic tripped Alvarez as he chased a simple long ball and the Manchester City forward then charged 50 metres, somehow keeping possession via two rebounds as defenders tried to tackle him, to poke in the second five minutes later.
Croatia, who came from behind to beat Japan and Brazil on penalties in the last two rounds, tried to hit back in the second half but their neat passing failed to open any real cracks in a determined Argentine defence.
Messi then burst into life, showing mesmerising control to drive to the byline and pull the ball back for Alvarez to tuck in the third after 69 minutes and wrap up the victory.