Mane contributed to Bayern's first goal when his shot was blocked into the path of teammate Jamal Musiala to score, but the Senegal forward's evening didn't last much longer.
Indicating discomfort in his right leg, he was taken off in the 20th minute for Leroy Sane.
Bremen had leveled soon after Musiala's opener, but three goals in six minutes for Bayern finished off the promoted team's chances.
Gnabry scored with a curling shot before Leon Goretzka charged through a gaping hole in the Bremen defense to add Bayern's third and Gnabry made it 4-1 off an assist from Sane.
Gnabry completed his hat trick in style in the 82nd by evading three Bremen defenders before scoring between the goalkeeper's legs. Seventeen-year-old Mathys Tel sprinted through the defense to score his third goal of the season and Bayern's sixth of the game.
Eric Maxim Choupo-Moting had scored in seven straight games for Bayern but, when the score was still at 1-1, he missed the opportunity to make it eight by firing a penalty straight at goalkeeper Jiri Pavlenka.
Bayern extended its lead to four points over second-place Freiburg, who play on Wednesday at RB Leipzig.
Additional reporting by AP.