Robin van Persie’s hat-trick overturned the visitors’ two-goal lead from the first leg and gave Moyes some much-needed breathing space after Sunday’s embarrassing 3-0 Premier League home defeat by Liverpool.
If the Netherlands striker – who was taken off on a stretcher late on with what looked like a knee injury – was the goal hero, then Moyes must also be indebted to David De Gea.
The goalkeeper made a crucial double save from David Fuster and Alejandro Dominguez moments before Van Persie scored United’s second in first half-stoppage time.
Van Persie’s contribution has been questioned this season but he set United on their way with a penalty, scored a clinical second before the break, then provided the decisive goal with a 51st-minute free-kick.
Moyes, whose future has been at the centre of so much speculation, was all smiles as he made his way towards the Stretford End at the final whistle. He can now at least contemplate extending United’s Champions League campaign, albeit as outsiders to claim the trophy.
With United so hapless against Liverpool, Moyes knew a Champions League exit was almost unthinkable and he fell back on the tried and trusted old guard in the shape of veteran player-coach Ryan Giggs to help deliver the result he so desperately needed.
Moyes gave the 40-year-old a rare start, and he was instrumental in United levelling the tie on aggregate by half-time.
Olympiakos knew just one goal would put United under intense pressure and it should have arrived early on when Joel Campbell, on loan from Arsenal, outstripped Phil Jones and pulled the ball back for Hernan Perez, who skied his finish into the Stretford End from only eight yards.
Giggs may have lost the pace of his youth but all the intelligence remains – and he was picking the passes that made the difference. One angled cross saw Wayne Rooney’s header turned on to the base of the post by Olympiakos keeper Roberto.
United got the breakthrough they craved after 25 minutes when Van Persie was needlessly barged in the back by Jose Holebas as they challenged for another astute pass from Giggs. The striker got to his feet to thump home a venomous spot-kick.