The Reds scored five goals, losing to an opponent before the two-goal break.
The match of the 14th round of the German Bundesliga, in which Bayern hosted Mainz, has ended.
The guests beat Hansi Flick's charges at the end of the first half of the meeting, but they failed to keep the two-goal advantage.
After the break, the Reds scored five goals against Mainz, which turned out to be more than enough to score the next three points.
Bayern 5-2 Mainz Goals:
Kimmich, 50, Sane, 55, Suele, 70, Lewandowski, 76 (pen), 82 - Burkardt, 32, Hack, 44.
Bayern: Neuer, Pavar (Goretzka, 46), Boateng (Sule, 46), Alaba, Davis, Tolisso (Douglas Costa, 88), Kimmich, Muller (Shupo-Moting, 88), Lewandowski, Gnabri (Musiala, 76),.
Mainz: Damen, Brosinski (Steger, 80), Hack, Saint-Just, Mwene (Papela, 89), Barreiro, Latsa, Boethius (Onisivo, 71), Fernandes, Quayson (Salai, 89), Burkardt (Mateta, 80).
Warnings: Boateng, Alaba - Boethius.