Much like the first half of the Ibrox tie, a vulnerable-looking Rangers team massively rode their luck in a hostile environment as the home side passed up chance after chance.
Anastasios Bakasetas' early near miss from a shot from the edge of the box started a period of relentless Panathinaikos pressure.
A near-post save from an inspired Jack Butland then denied Fotis Ioannidis, who also had a close-range bullet header saved brilliantly by the rejuvenated Rangers goalkeeper.
Another fine stop from Butland thwarted Facundo Pellistri before the ex-Manchester United winger somehow sliced over from close range after Rangers played themselves into trouble.
If Martin's men were four down at the break, they would have had little to argue about. Andy Halliday said on BBC Sportscene it was a "minor miracle" his former side had not conceded in the first period.
That theme continued into the second half as Panathinaikos finally found the goal their attacking play merited, with a cross catching out the Rangers defence before Duricic nodded in.
The flag was raised, but replays showed the Serbian forward had been played onside by Nasser Djiga and Max Aarons.
Rangers fans would have been fearing the worst at that point, but summer signing Gassama's excellent finish on the volley ultimately sealed a potentially massive result so early in Martin's tenure.
Remarkably, the away side could have won the second leg when substitute Cyriel Dessers raced clear in stoppage time, but the striker failed to beat home goalkeeper Bartlomiej Dragowski.