Missed the match? Catch-up via beIN SPORTS CONNECT | available via Foxtel, Kayo Sports, Fetch TV & beIN SPORTS CONNECT
Having taken the lead through Martin Odegaard's stunning first goal for the club, Arsenal looked set to be the masters of their own downfall in Piraeus.
After surviving a David Luiz mistake late prior to half-time, the Gunners gifted Olympiacos an equalsier when Youssef El-Arabi robbed Dani Ceballos of possession.
Yet with El-Arabi, who scored the winner when Olympiacos knocked Arsenal out last season, squandering another gilt-edged chance, Gabriel headed in a second away goal to give the Gunners the edge before Elneny's wicked strike put them in control ahead of the return leg.
Kieran Tierney's strike inspired Arsenal's comeback against Benfica at the same stadium on February 25, and the full-back should have had an assist to his name in the third minute of this game, but Odegaard dragged wide from his neat cut-back.
Pierre-Emerick Aubameyang's deflected header looked set to put Arsenal ahead three minutes later, only for Jose Sa to make a superb save onto the crossbar.
Odegaard more than made amends for his earlier miss when he struck in the 34th minute, slamming a powerful, left-footed shot beyond Sa from 30 yards.
Arsenal's work was almost undone by David Luiz's error moments later – Giorgos Masouras blazing over.
Thomas Partey forced Sa into action shortly after the restart, before he was taken off for Ceballos, and that change quickly backfired.
Bernd Leno's sloppy pass put Ceballos in trouble, and El-Arabi nipped in to fire home.
El-Arabi could have taken his tally of goals against Arsenal to three when Lazar Randjelovic drilled in a cross, but he failed to divert it on target.
Olympiacos were made to pay – Gabriel rising high above Yann M'Vila to meet Willian's cross and send a looping header into the right-hand corner before Elneny's swerving strike clipped in off the woodwork to give Arsenal breathing space in the tie.