Leroy Sane and Niklas Sule spurned good chances early on before Bayern took a deserved lead in the 30th minute through Leon Goretzka, who was unselfishly played in by Thomas Mueller after Freiburg lost possession on the edge of the box.
The visitors sat deep after the break and soaked up the pressure from Bayern but almost conceded a second before the hour-mark when Goretzka struck the post with a low shot following a dummy from Sane.
Freiburg denied Goretzka again minutes later, but Lewandowski netted a second in the 75th minute with a finish from close range after some smart work down the left from Alphonso Davies.
Janik Haberer grabbed a goal for Freiburg in the third minute of stoppage time, but Bayern held on for the win.
Bayern top the league table with 28 points from 11 games, four points ahead of second-placed Borussia Dortmund, who play RB Leipzig later on Saturday. Freiburg are third on 22 points.