They remain on course to send him off with a treble of Champions League, Bundesliga and German Cup - but were unconvincing for much of the afternoon.
Both Mats Hummels and Lewandowski were unable to convert early chances, before the Poland international ran on to Xabi Alonso's through pass and chipped keeper Martin Hansen, only for Marvin Matip - brother of Liverpool defender Joel - to clear off the line.
Muller was denied by Florent Hadergjonaj's goalline clearance early in the second half, and Lewandowski swerved a shot against the post before the two late goals turned one point into three.
RB Leipzig, in second, seemed to be the only team who could challenge Bayern for the title, but they fell to a fourth defeat in seven Bundesliga matches as Hamburg boosted their hopes of avoiding relegation.
Defender Kyriakos Papadopoulos headed in the opener against his former club, before Brazilian Walace added a near-identical second. Aaron Hunt wrapped up victory with his 50th Bundesliga goal.
That lifted Hamburg out of the relegation play-off place, into which dropped Werder Bremen, who were beaten 1-0 at home byBorussia Monchengladbach.
Third-placed Eintracht Frankfurt andBorussia Dortmund, in fourth, also lost. Javier Hernandez, the former Manchester United striker, scored twice for mid-tableBayer Leverkusen as they beat Eintracht 3-0 - with his first goal a clinical finish from seven yards, and his second a sublime volley.
The biggest upset of the day, though, was Dortmund's 2-1 defeat at Darmstadt, who had collected just one point from their previous 11 league matches. Terrence Boyd and Antonio Colak scored to give Darmstadt boss Torsten Frings victory over a club he used to play for.