Pep Guardiola's side remain seven points clear of nearest challengers Wolfsburg after defeating Leverkusen, who remain the last team to beat Bayern at the Allianz Arena, back in October 2012.
The visitors threatened after four minutes when Juan Bernat was forced to clear off the line after Karim Bellarabi pounced on a rare mistake.
But Bayern took the lead when winger Ribery volleyed home from a corner on 51 minutes to claim his 100th competitive goal for the club in all competitions on his 186th league appearance -- the most for a French player in the Bundesliga.
This was an off-key performance from Bayern, who managed just two first-half shots, as they began a busy period of five matches in 14 days, including Wednesday's final Champions League group game at home to CSKA Moscow.
"It was important for the team to get the win, especially before our Champions League game at home and three Bundesliga games in quick succession," said Ribery.
"It won't be easy, but that was a good start."
Leverkusen, meanwhile, were lucky to finish with 11 men after Bellarabi hacked down Sebastian Rode in the dying stages but was only shown a yellow.
Roger Schmidt's side drop to fourth in the table ahead of Tuesday's Champions League clash at Benfica.
Earlier, second-placed Wolfsburg came from behind to claim a 3-1 win at Lower Saxony rivals Hanover 96 to briefly trim Bayern's lead to four points.
However, Wolfsburg coach Dieter Hecking gave a grumpy reply when asked about his side's supposed role as 'Bayern hunters'.
"We aren't 'Bayern hunters', I don't have to emphasise that every week, do I?" he said, rejecting the German media's tag for the Volkswagen-backed club.
"Bayern are the superior team and they'd need to play with seven men each week for us to have a chance to catch them."
Belgium's Kevin de Bruyne gave Wolfsburg a fourth-minute lead in the derby before Spaniard Joselu levelled for Hanover with a header, but both Wolfsburg's second-half replacements scored within minutes of coming on to seal the win.
Dutch striker Bas Dost headed home his first goal of the season just two minutes after replacing Ivica Olic and Germany Under-21 forward Maximilian Arnold secured the three points when he netted on 85 minutes.