Messi scored the first goal at Ahmad bin Ali Stadium, his first in the knockout stages at a ninth attempt, before Julian Alvarez added a second in the second-half.
Craig Goodwin's late deflected strike ensured they would need it but dogged defending and a stoppage-time Emiliano Martinez save saw them through to the last eight.
"It was a tough game, a tough day," Messi said afterwards. "We had very little time to rest. We were tired. It was a very physical game.
“We're happy with this victory and another step forwards. We're through, that's the important thing."
Argentina's matches in Qatar have felt like home games such is the volume and vociferousness of their support at each.
Messi praised the waves of blue and white in the stands for helping to drive his team on.
"These are incredible moments. We want to thank all the people who are here. The whole of Argentina would love to be here," he added after leading celebrations on the pitch.
"This unity that we have enjoyed for a while is very beautiful. It's incredible how the fans are living each game and transmitting so much passion and energy. I thank them because it's incredible."
After a hectic tournament with games coming every four days, Argentina will now face the Netherlands in the next phase on Friday.
"We had played very recently, we didn't have much time to rest up. We were concerned. They were very strong," Messi added.
"Luckily, we found the goal and we were one goal ahead and then we were two goals ahead. And then we had a setback. That's the World Cup for you. The matches are always difficult.
"We've taken another step and now another difficult one is coming."