Lewandowski scored for his 12th game in a row to leave him with 18 goals in 13 games in all competitions so far this season.
After Youssef El Arabi had given Olympiakos a shock lead in Athens, Lewandowski poached goals, both after good work in the build-up from Thomas Mueller, to turn the game before Corentin Tolisso grabbed a third with a superb strike.
Worryingly for the defending German champions, Olympiakos again beat Bayern goalkeeper Manuel Neuer late on when Brazilian midfielder Guilherme hit the back of the net in a tense last ten minutes.
There was unpleasant news before kick-off in Athens when the UEFA Youth League match between Bayern and Olympiakos was abandoned with the Germans winning 4-0 after a masked gang attacked visiting fans with clubs leaving at least seven people injured.
The Greek hosts can expect a hefty fine from UEFA, but the away win could have also cost Bayern a second centre-back in three days as Lucas Hernandez limped off after Niklas Suele tore his cruciate ligament on Saturday.
This was Bayern's third straight win in Europe to leave them five points clear at the top of Group B ahead of Tottenham Hotspur, who won 5-0 at home to Red Star Belgrade, while Olympiakos stay bottom of the group.
Mueller had started the previous eight games on Bayern's bench, but the Germany star was finally named on the right wing and made his point with both assists for Lewandowski.
Since thrashing Tottenham 7-2 in north London three weeks ago, Bayern have failed to win their last two Bundesliga games and got off to a bad start at the Stadio Georgios Karaiskakis.
After El-Arabi's header beat Neuer at the far post, the hosts almost got a second goal when Hernandez got a foot to a Kostas Tsimikas cross, which was heading towards goal before Neuer intervened.
Olympiakos' lead lasted 11 minutes as Mueller blasted an acrobatic volley which was blocked by goalkeeper Jose Sa, but Lewandowski pounced to fire home.
It was 1-1 at the break, but the Poland star put Bayern ahead when he stabbed home from close-range after Mueller had a shot blocked with an hour gone.
Tolisso, a half-time replacement for Javi Martinez in central midfield, then curled home a superb third for Bayern on 75 minutes from long range.
Guilherme allowed home fans to dream four minutes later with a similar thunderbolt shot from distance after poor defending which beat Neuer to narrow the scoreline.