Arsenal took the lead on 34 minutes when Real Madrid loanee Martin Odegaard scored an absolute screamer from long range to open his Gunners account to stake the visitors to a half-time lead.
Norwegian Odegaard was delighted after a fine individual performance.
“I have felt at home since the first day, I am happy to be here and feel great,” the 22-year old midfielder, who joined Arsenal in January, said.
“It is a big win for us, a great result with three goals away from home and a win in this competition is always good. The mentality in this team is great, if one player makes a mistake we react. That is what it’s about, being a team.”
The teams were back on level terms shortly before the hour mark after a poor Dani Ceballos giveaway allowed Youssef El Arabi to pick up the ball and shoot past Bernd Leno from distance to make it 1-1.
Hector Bellerin made a last-gasp intervention which denied El Arabi a second goal and it turned out to be a pivotal moment as Arsenal finished strongly.
Arsenal’s Gabriel climbed the ladder to head a corner kick back over Olympiakos’ Jose Sa and into the netting at the far post to give Mikel Arteta’s team the lead again.
“We were really solid, really dominant,” Arteta said. “We showed a lot of personality to come here and dominate like we did. The next thing is to do that for 90 minutes and give nothing to the opponent.”
Substitute Mohamed Elneny then scored a stunner of his own just after coming off the bench with a blasted, swerving shot from well outside the penalty area to secure the win and give his team a decided advantage with three away goals in the first leg.
The two teams will meet for the decisive second leg in London next Thursday.