The Herons trailed 1-0 at the break, but Telasco Segovia levelled matters two minutes into the second half off a cross into the box from Marcelo Weigandt.
Then it was time for the 37-year-old Argentinian to add a trademark goal to a resume that already assures he'll go down as one of the game's greatest ever.
Samu Omorodion scored from a penalty kick in the opening minutes after a video review for the Portuguese club's first goal of the tournament.
Both teams were held to scoreless draws in their opening Group A matches.
Messi was taken down just outside the penalty area by Rodrigo Mora during a run from the middle of the field. Â The crowd at Mercedes-Benz Stadium chanted "Messi!" Messi! Messi!" before his left-footed blast cleared the Porto wall and ripped the net in the top right corner in the 54th minute.
Inter Miami return to South Florida on Monday, knowing a victory over Brazilian club Palmeiras at Hard Rock Stadium will lock up their spot in the round of 16.
In desperate need of a win, Porto will close out group play against Egypt's Al Ahly at MetLife Stadium in East Rutherford, New Jersey.
Earlier, Palmeiras beat Egyptian club Al Ahly 2-0 at the MetLife Stadium, with the game interrupted during the second half because of the threat of lightning in East Rutherford, New Jersey.
The Brazilians had seen forward Raphael Veiga shown a straight red card by English referee Anthony Taylor in the 37th minute following a high challenge on Al Ahly winger Zizo.
However, after being advised to review the incident on the pitchside monitor, Taylor changed his decision to issue only a yellow card.
Palmeiras broke the deadlock three minutes into the second half through an own goal when Al Ahly forward Wessam Abou Ali headed a deep free-kick into the top corner of his own net before substitute Flaco Lopez broke clear to double the lead just ahead of the hour.
With thunderstorms looming, the players were soon signalled to come off as the match was suspended in the 63rd minute.
A notice was displayed on the stadium's big screen, directing all spectators to leave the seated bowl area and take shelter inside "for your safety" because of "severe weather in the area".
Following a delay of around 45 minutes, with the weather conditions improved, play was able to continue.
Palmeiras went on to close out a first win that put them level on four points with Inter Miami ahead of their final group game at the Hard Rock Stadium on June 24.
with PA