Julian Nagelsmann's side was thrashed 5-0 by Borussia Monchengladbach in Thursday's (AEDT) DFB Pokal clash but Lewandowski's first-half brace settled any early nerves on Sunday (AEDT).
Leroy Sane put Bayern three ahead away from home, although Niko Giesselmann hit back for Union, as did Julian Ryerson after Kingsley Coman had made it four.
Thomas Muller sealed the victory with just more than 10 minutes remaining, netting Bayern's 38th goal after just 10 matches of the league season in a new Bundesliga record.
The scoring started from the penalty spot after Paul Jaeckel was adjudged to have handled the ball and Lewandowksi slotted into the bottom-left corner.
The Poland forward soon added a second as he rifled into the top-right corner after a short free-kick routine.
Sane was denied from close range by Andreas Luthe shortly after, but the Bayern winger made amends, tapping in Muller's cross, before Giesselmann pulled one back for Union, which also saw Taiwo Awoniyi's strike ruled out for offside.
Manuel Neuer was twice required to parry away from Sheraldo Becker after the interval, and those saves provided a platform for Coman to extend the visitors' lead again as he blasted into the top-right corner.
Ryerson turned in from Kevin Behren's cutback after 65 minutes, but Union's 21-match unbeaten run at home in the Bundesliga would not be prolonged as Muller finished high into the net.