Lyon took the lead nine minutes after the break when Karl Toko Ekambi's teasing cross was met by a first-time finish from Lucas Paqueta.
PSG got back on level terms with a 66th-minute penalty, Neymar converting from the spot after he was deemed to have been fouled in the box by Malo Gusto.
Substitute Icardi then popped up in added time at Parc des Princes to secure the points for the home side with a brilliant header from Kylian Mbappe's cross.
In a fervent atmosphere generated by the PSG supporters – the air thick with smoke from pyrotechnics prior to kick-off – Messi's early touches were roared by the home fans.
His first real chance came with an angled run into the area when unchecked and he was picked out by Ander Herrera, but Jason Denayer was able to get in a vital block.
PSG needed a goal-line header from Herrera moments later to keep out a fierce drive from Gusto as Lyon threatened at the other end.
Messi had his head in his hands just after the half-hour mark when he latched on to a backheel from Neymar inside the box, only for goalkeeper Anthony Lopes to save his clipped effort with his legs.
The Argentina international then struck the corner of the crossbar with a curling free-kick shortly afterwards as Lopes stood on his line motionless.
However, it was Lyon who went ahead early in the second half when Paqueta found space between Nuno Mendes and Marquinhos to crisply strike the ball beyond Gianluigi Donnarumma.
Neymar went down after he tussled with Gusto inside the area and then confidently sent Lopes the wrong way from the resulting penalty kick to level the score.
Messi saw an angled drive whistle just past the post before being replaced by Achraf Hakimi with 14 minutes left, but it was another sub in Icardi who made the biggest impact, nodding in during the dying moments.