Back to domestic duties after its FIFA Club World Cup success in Qatar with a home draw against Arminia Bielefeld, the reigning champion slipped to a 2-1 loss away at Eintracht Frankfurt last weekend.
However, a 4-1 thrashing of Lazio in UEFA Champions League action in midweek proved the catalyst for a first league triumph at its Allianz Arena home since 30 January.
Lewandowski's first goal helped Bayern ease into a 2-0 half-time lead and while Cologne briefly threatened a comeback, the returning Thomas Muller made an immediate impression off the bench, providing the assist that allowed the competition's leading scorer to take his tally for the campaign to 28.
Like Muller, substitute Gnabry had an impact on his comeback, the Germany international tucking away a pair of routine finishes as the hosts eased clear in the closing stages.
Eric Maxim Choupo-Moting had opened the scoring with his first league goal for the club, heading in an inviting cross from Leon Goretzka, who then went on to set up his side's second before the break.
The midfielder waltzed his way beyond Rafael Czichos before laying the ball off as goalkeeper Timo Horn came towards him, allowing the ever-ready Lewandowski to roll it into the net.
Cologne failed to even muster an attempt as the first half proved to be one-way traffic, yet it was gifted a route back into the game when hesitation between centre-back pairing Jerome Boateng and David Alaba allowed Ellyes Skhiri in to produce a delicate lofted finish over the advancing Manuel Neuer.
The goal caused a brief wobble, yet the 64th-minute arrival of Muller – back after overcoming COVID-19 – helped steady Bayern, the substitute teeing up Lewandowski to restore the two-goal cushion with a shot on the turn.
Dominick Drexler hit the post from a tight angle after robbing possession from Neuer before Gnabry's four-minute brace, the second of which was set up by the outstanding Goretzka with another delightful delivery into the area, added a touch of gloss to the final scoreline.