Champions Bayern Munich had to work hard for more than an hour before beating VfB Stuttgart 4-1 in the Bundesliga on Sunday and stay six points off leaders Borussia Dortmund.
The Bavarians, who face Liverpool in the Champions League last 16 next month, took the lead with their first shot on goal, Thiago Alcantara firing in from 12 metres.
But instead of a comfortable afternoon, the hosts were made to work hard.
Stuttgart snatched a 26th minute equaliser through Tasos Donis' superbly curled effort before Christian Gentner's 55th minute own goal, a deflection of Serge Gnabry's shot, gave Bayern a renewed lead.
The visitors refused to give up and hit the woodwork with Nicolas Gonzalez on the hour.
Lewandowski then made amends for his earlier miss in the 85th as Bayern completed their win to move up to second on 42 points.
Dortmund are on 48 after crushing Hanover 96 5-1 on Saturday. Borussia Moenchengladbach are third on 39, having beaten Augsburg 2-0.