Ernesto Valverde's team found themselves two down after 16 minutes as early strikes from Spanish defender Ximo Navarro and Brazilian forward Rogerio stunned the hosts.
Olympiakos' Belgian striker Mirallas inspired a spectacular comeback, scoring four times to take his tally for the season to 18 goals as Tripolis were taken apart.
Rafik Djebbour and Pablo Orbaiz were also on target for the Reds in a win that maintained Olympiakos' four-point advantage at the top of the table ahead of Panathinaikos who were 1-0 winners at OFI Crete on Saturday courtesy of a solitary goal from Brazilian forward Cleyton.
The gap could widen to seven this week if Panathinaikos lose their appeal against a three-point deduction for this season and a two-point penalty for next season following violence against Olympiakos earlier this month.
They were handed the points penalty, a 252,500-euro fine and told to play four games behind closed doors after the violence which resulted in a 45-minute delay as fans pelted police with Molotov cocktails, flares and missiles.
Panathinaikos appealed against the punishments, meaning the points deduction has not yet taken effect.
PAOK Salonica returned to winning form after two games without a victory with a 4-0 hammering of lowly Kerkyra, a result which kept them in fourth spot, one point ahead of AEK Athens who ran out 1-0 winners against Panaitolkos thanks to a goal from Nikos Liberopoulos.
This season's surprise package Atromitos continued their bid for a European place with a 1-0 win over Skoda Xanthi on Saturday thanks to striker Kostas Mitroglou's 15th goal of the season which saw them hold on to third spot.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.