Elkin Soto opened the scoring at the Coface Arena but Bastian Schweinsteiger levelled matters with a fine free-kick before the visitors' Dutch winger struck in the dying seconds
Pep Guardiola's side have totally dominated the German top flight this term and passed the previous best of 44 points by the Christmas interval with victory at the Coface Arena on Friday.
Elkin Soto broke the deadlock for the hosts in the 21st minute after both sides had seen goals disallowed for offside.
But that lead lasted just three minutes, as Bastian Schweinsteiger grabbed his first goal of an injury-ravaged campaign with an expertly executed free-kick.
There was little to choose between the sides for much of the encounter, but Robben popped up in the 90th minute to snatch victory.
The result extends Mainz's winless run to nine matches, while Bayern have now won their last eight Bundesliga matches on the bounce and go into Christmas unbeaten for the second straight season.
With Robert Lewandowski, Xabi Alonso and Mehdi Benatia all missing, Pep Guardiola brought Jerome Boateng, Schweinsteiger and Pierre Hojbjerg into his starting XI, and Bayern looked to make a quick start – Franck Ribery sending an effort just wide inside the opening two minutes.
Mainz looked to have taken a shock lead in the fourth minute when Pablo De Blasis stooped to head in a Daniel Brosinski cross from the right, but the linesman correctly raised his flag for offside.
Gonzalo Jara made a superb recovery challenge having headed the ball to an unmarked Thomas Muller in the penalty area after 12 minutes, and Bayern saw a goal of their own ruled out for offside seven minutes later, with replays showing Robben's effort to be a much tighter call than the home side's.
With two goals already chalked off, Bayern could have been forgiven for sending a hopeful glance in the direction of the linesman when Soto sent the ball between goalkeeper Manuel Neuer's legs from a Shinji Okazaki cross – no such luck this time around.
Bayern were back on terms within three minutes, though, with Schweinsteiger curling in a 25-yard free-kick off the left-hand upright for his first league goal since April.
Guardiola may have been taken aback by Mainz's sustained threat after conceding the equaliser, but Robben should have done better when his marauding run down the right wing at the beginning of the second half fizzled out.
Yunus Malli showed glimpses of his ability during the opening period, and forced Neuer into an impressive save after the interval.
The 22-year-old was sent one-on-one with the Ballon d'Or nominee, who dived to his right to make a superb one-handed stop.
Boateng pulled the trigger when the ball fell to him some eight yards from goal after 68 minutes, but the defender's effort was poor and collected comfortably by goalkeeper Loris Karius.
Bayern piled late pressure on the home side and got their reward as Juan Bernat's left-wing cross was missed by Muller, but not Robben, who took a touch before drilling home from close range to rewrite more history for the Bavarian giants.