Zlatan Ibrahimovic's eighth goal of the European campaign had the hosts in the driving seat but the dismissal of PSG midfielder Marco Verratti just moments into the second half gave hope to the Greek visitors.
PSG nevertheless were wasteful with a number of chances to extend their lead and Olympiacos made them pay when Kostas Manolas levelled from a corner 10 minutes from time.
But there was still time for a winner as Edinson Cavani beat the offside trap in the final minute to fire beyond the helpless Roberto.
The win sees PSG move six points clear at the summit with just one game remaining, while Olympiacos must win against Anderlecht in their final group outing to be sure of joining the Parisians in the knockout stage.
The hosts took the lead after seven minutes when PSG right-back Gregory Van Der Wiel galloped down the wing and sent in a low deflected cross that fell perfectly for Ibrahimovic, who finished high into the net.
Olympiacos were far from overawed against their expensively-assembled opposition, however, and Konstantinos Mitroglou went close with a volleyed effort that drew a smart stop down low from Salvatore Sirigu.
Mitroglou came close again in the 33rd minute when he worked space for a clear shot on goal from inside the box but rather scuffed his effort and Sirigu was able to make a routine stop.
Five minutes before the break Cavani almost doubled the hosts' lead when he was played in behind the defence but his well-hit drive was well parried away by Roberto.
PSG appeared to be well in command when the match restarted but the second half was just 20 seconds old when they were reduced to 10 men as Verratti picked up a second booking for a needless pull-back on David Fuster, having already been cautioned for handball in the first period.
Verratti's lack of discipline was also bad news for PSG striker Ezequiel Lavezzi, who was sacrificed moments later with coach Laurent Blanc forced to bulk up his depleted midfield by bringing on Adrien Rabiot.
Despite the bother in the home ranks they very nearly doubled their lead in the 51st minute when Ibrahimovic's ferocious free-kick from 35 yards was kept out by Roberto's spectacular flying save.
With an hour gone PSG threatened again, Ibrahimovic again the danger man with a powerful strike from the edge of the area that was always rising too quickly.
Roberto had to be alert in the 72nd minute to keep the deficit to one as he got down quickly to parry away Rabiot's well-struck 20-yarder.
PSG appeared comfortable despite being a man down but a corner with 10 minutes remaining changed all that as Olympiacos forced a controversial equaliser.
Alejandro Dominguez appeared offside when his initial shot from Manolas' flick-on was saved by Sirigu, but Manolas was not about to stand around waiting for the assistant's flag and lashed the ball home.
PSG refused to let the game ebb away, however, and in the final minute Marquinhos sprung the offside trap to set Cavani on his way and the Uruguayan did the rest with an agricultural toe-poke beyond the wrong-footed Roberto.