Jhon Cordoba shot past Manuel Neuer to give the hosts a surprise early lead before Robert Lewandowski equalised after being set up by Robben.
Robben headed home from Thomas Muller's cross to give Bayern the lead before a Lewandowski free-kick made it 3-1.
Bayern move above RB Leipzig on goal difference.
Both teams are on 30 points, but Bayern have played one game more.
Leipzig will re-establish a three-point lead if they beat eighth-placed Schalke at home on Saturday (17:30 GMT).
Champions Bayern had 10 shots in the opening 45 minutes against Mainz, and scored with two of their four attempts on goal.
Muller wasted a great chance to net his first Bundesliga goal of the season when the score was 1-1.
The 2014 World Cup winner has now gone more than 15 hours without a league goal.
Match ends, 1. FSV Mainz 05 1, FC Bayern München 3.
Second Half ends, 1. FSV Mainz 05 1, FC Bayern München 3.
Attempt missed. Stefan Bell (1. FSV Mainz 05) header from the centre of the box is high and wide to the left. Assisted by Daniel Brosinski.
Foul by Douglas Costa (FC Bayern München).
Giulio Donati (1. FSV Mainz 05) wins a free kick on the right wing.
Goal!  1. FSV Mainz 05 1, FC Bayern München 3. Robert Lewandowski (FC Bayern München) from a free kick with a right footed shot to the top left corner.
Leon Balogun (1. FSV Mainz 05) is shown the yellow card for a bad foul.
Robert Lewandowski (FC Bayern München) wins a free kick in the attacking half.
Foul by Leon Balogun (1. FSV Mainz 05).
Javi Martínez (FC Bayern München) wins a free kick in the defensive half.
Foul by Karim Onisiwo (1. FSV Mainz 05).
Corner,  FC Bayern München. Conceded by Stefan Bell.
Attempt blocked. Arjen Robben (FC Bayern München) left footed shot from the centre of the box is blocked. Assisted by Douglas Costa.
Substitution, FC Bayern München. Renato Sanches replaces Thomas Müller.
Stefan Bell (1. FSV Mainz 05) is shown the yellow card.
Robert Lewandowski (FC Bayern München) wins a free kick on the right wing.
Foul by Stefan Bell (1. FSV Mainz 05).
Jhon Córdoba (1. FSV Mainz 05) is shown the yellow card.
Philipp Lahm (FC Bayern München) wins a free kick in the defensive half.
Foul by Jhon Córdoba (1. FSV Mainz 05).
Robert Lewandowski (FC Bayern München) wins a free kick in the defensive half.
Foul by Stefan Bell (1. FSV Mainz 05).
Substitution, 1. FSV Mainz 05. Pablo De Blasis replaces André Ramalho.
Philipp Lahm (FC Bayern München) wins a free kick on the right wing.
Foul by Daniel Brosinski (1. FSV Mainz 05).
Attempt blocked. Mats Hummels (FC Bayern München) header from the centre of the box is blocked. Assisted by Douglas Costa with a cross.
Corner,  FC Bayern München. Conceded by Levin Öztunali.
Attempt saved. Danny Latza (1. FSV Mainz 05) right footed shot from outside the box is saved in the top centre of the goal. Assisted by Jhon Córdoba.
Foul by Robert Lewandowski (FC Bayern München).
Leon Balogun (1. FSV Mainz 05) wins a free kick in the defensive half.
Substitution, FC Bayern München. Arturo Vidal replaces Joshua Kimmich.
Robert Lewandowski (FC Bayern München) is shown the yellow card.
Foul by Robert Lewandowski (FC Bayern München).
Leon Balogun (1. FSV Mainz 05) wins a free kick on the right wing.
Attempt missed. Levin Öztunali (1. FSV Mainz 05) right footed shot from the centre of the box misses to the left following a corner.
Corner,  1. FSV Mainz 05. Conceded by Douglas Costa.
Substitution, 1. FSV Mainz 05. Danny Latza replaces Fabian Frei.
Attempt saved. Karim Onisiwo (1. FSV Mainz 05) right footed shot from the centre of the box is saved in the bottom left corner. Assisted by Daniel Brosinski.
Substitution, FC Bayern München. Douglas Costa replaces Franck Ribéry.
Hand ball by Levin Öztunali (1. FSV Mainz 05).
Bayern Munich returned to the top of the table as Arjen Robben scored one and set up another against Mainz on his 150th appearance in the Bundesliga.