Napoli, more coherent as a team despite boasting less individual talent, went ahead in the Group C game with a Lorenzo Insigne goal in the 29th minute before PSG, who have won their opening 10 league games, equalised with a Mario Rui own goal in the 61st minute.
An opportunist goal by Dries Mertens put Napoli back in front in the 77th minute but they were denied a shock win when Di Maria collected the ball on the edge of the area and curled a stunning effort past David Ospina in the third minute of stoppage time.
It was a cruel finale for Ospina, who had kept PSG at bay with several outstanding saves.
Napoli coach Carlo Ancelotti was returning to the Parc des Princes for the first time since leading Bayern Munich to a 3-0 defeat there last September. He was sacked by the Germans the following day.
"We deserved the win but we knew that PSG have so much quality that they only need a moment to punish you," said Ancelotti, who coached Di Maria when the pair were at Real Madrid.
Napoli's first dangerous foray upfield nearly ended in a goal as Mertens thumped the ball against the crossbar from an inviting Mario Rui cross.
In the next attack, Jose Callejon curled a ball behind the PSG defence and into the path of Insigne, who gently flicked his shot over Alphonse Areola.
Ospina then made another one-on-one save, this time foiling Kylian Mbappe.
Mertens put Napoli back in front, reacting quickly to fire past Areola after Fabian Ruiz's shot hit PSG captain Marquinhos and landed at his feet.
The visitors were heading for top spot until Di Maria's goal threw the group wide open and provided a fitting end to an enthralling match.
"We knew it was going to be difficult against Liverpool and Napoli, and we're not favourites," said PSG coach Thomas Tuchel. "Everyone thinks we are, but I don't believe that."