Making his fourth appearance since leaving Barcelona, Messi ran from the halfway line before playing a one-two with Kylian Mbappe and leaving Ederson rooted to the spot with a lovely 20-yard shot.
The strike sealed three points for PSG, who had gone ahead after seven minutes through Idrissa Gueye.
The Senegal midfielder netted with an excellent drive into the top corner.
Overall it was an enthralling contest at the Parc De Princes as two of Europe's heavyweights went toe-to-toe.
City had plenty of chances to score in between PSG's two goals as Raheem Sterling's header hit the bar and Bernardo Silva struck the woodwork from the rebound.
But the real story of the night was Messi as his slow start in Paris burst into life against his former Barcelona manager in Guardiola.
Speaking to reporters after the game, Guardiola was upbeat despite the result.
He said: "Good performance. We did everything except score. They defended deep and were dangerous with counter-attack. My biggest compliment for the team.
"In the second half Donnarumma made good saves. The team was there - the same as Stamford Bridge. It's a pity. We played to win. Unfortunately they didn't need much to score their goals.
"The [Messi] goal was fantastic.
"We're going to eat good tonight, drink a glass of wine, recover and prepare for the Liverpool game."
Need a VPN? Or seeking to switch? Then support Tribal Football by clicking here to sign up with our official partners NordVPN. Not only will you receive the best VPN experience, but also great discounts by signing up via Tribal Football. Thanks for your support!