The Dutchman was the star of the show to ease the pressure on under-fire manager David Moyes as the Red Devils fought back from a two-goal first-leg deficit to go through.
The hosts had trailed 2-0 heading into the second leg, with manager David Moyes under huge pressure to produce a result, but the Scot avoided a Greek tragedy with the help of his prolific Dutch front man.
|VIEW FROM OLD TRAFFORD
|By Jonathan Birchall
Manchester United's season lives on. On a night when failure simply was not an option for David Moyes and his side, the Premier League champions did enough, just, to secure passage into the last eight of Europe's premier competition.
Robin van Persie's stunning hat trick was a fitting way to win a tie that brought the very best out of Old Trafford, with the Stretford End at its loudest for a very long time. For the first time in what feels like a very, very long time, there are smiles again at the Theater of Dreams.
Penalties have become a familiar sight at Old Trafford in recent days - United conceded three in the weekend Premier League mauling by Liverpool - and Van Persie put the hosts ahead from 12 yards when one went their way in the 25th minute after a foul by Jose Holebas.
The Netherlands striker doubled his tally on the stroke of halftime to level the tie on aggregate before curling home a free kick seven minutes into the second period to seal the win and a famous comeback.
The result takes United into the last eight for the first time since 2011, while Olympiakos has now lost on all 12 of its visits to England, conceding an average of three goals.
Moyes made four changes from Sunday's 3-0 Premier League defeat at home to fierce rivals Liverpool, bringing Rio Ferdinand and Ryan Giggs into an experienced starting XI, and it was United which did the early pressing.
Wayne Rooney was first to challenge visiting goalkeeper Roberto, with the Spanish shot stopper electing to extravagantly punch clear from a free kick, but United's Herculean task almost became even greater 15 minutes in, when Hernan Perez scooped the ball over after good work by Joel Campbell to set up the opportunity.
Rooney went agonizingly close to making the visitors pay for that miss as he headed against the left-hand post from Giggs' cross, with replays suggesting Roberto may have gotten the slightest of fingertips to the ball.
United broke the deadlock from the spot after 25 minutes - Van Persie powering home after he had been recklessly bundled to the ground from behind by Holebas.
Patrice Evra had Roberto diving at full stretch 10 minutes before the break, forcing the Spaniard into an impressive stop with a headed effort from Van Persie's corner.
David De Gea then made a crucial double save at the other end, first stopping David Fuster's header and then recovering well to keep out Alejandro Dominguez's effort from close range.
And United were level in the tie in first-half stoppage time when Van Persie tapped home through the legs of Roberto after a cross from Rooney.
The Dutchman was single-handedly rescuing their hopes, and he completed his hat trick in the 52nd minute by curling a 20-yard free-kick around the Olympiakos wall and beyond a statuesque Roberto to give the home fans belief and lift a considerable weight off Moyes' shoulders.
However, he almost had the ball in the back of his own net shortly after when Dominguez's free kick deflected narrowly wide off his head.
The delicate nature of the scoreline was emphasized when Fuster's rifled effort straight at De Gea in the 67th minute had many a Mancunian heart in their mouth, with Olympiakos still only a single away goal from victory.
But United weathered a late storm to cling on to an important victory, although the sight of Van Persie leaving the field on a stretcher late will be of some concern.