Ribery and Robben dazzle as Bayern go top
Frenchman Ribery fired the first goal after 22 minutes before Werder substitute Markus Rosenberg levelled early in the second half.
Dutchman Robben converted two penalties and Ribery was on target again as Bayern produced a dazzling three-goal blitz in 14 minutes in the second period to move on to 31 points from 15 games and end a two-match losing sequence.
"There was a lot of pressure on us and we wanted to win," Ribery told reporters.
"It is not easy to win all the time but we bounced back and reacted well today. I am happy."
Werder, fourth on 26 points, had Aaron Hunt sent off for a foul late in the game.
Dortmund, who took a first-half lead through Robert Lewandowski before Mike Hanke rifled in a 20-metre equaliser after 72 minutes, and Gladbach both have 30 points.
Hertha Berlin are ninth after being held 1-1 - their third draw in three games - at relegation-threatened Kaiserslautern.
VfL Wolfsburg, who had Makoto Hasebe sent off in the 85th minute, squandered a two-goal lead against Mainz to draw 2-2.
Cologne's Lukas Podolski scored twice, including an 88th-minute equaliser, to rescue a 2-2 draw at VfB Stuttgart.
Christian Gentner struck twice for Stuttgart after Podolski had converted a 15th-minute penalty but the Germany winger then slotted his 11th league goal of the season two minutes from time.
Stuttgart are seventh on 22 points while Cologne are 11th.
Ribery gave Bayern the perfect start when he connected with David Alaba's pinpoint pass to fire in from 16 metres midway through the first half.
Werder went close with a Naldo header after the restart and the visitors then drew level after 52 minutes when Claudio Pizarro flicked the ball on for Rosenberg to thunder in a low drive from just outside the box.
Their joy was shortlived though as Thomas Muller went down in the area after 69 minutes and Robben, who had come on nine minutes earlier, converted his spot-kick.
Ribery made it 3-1 eight minutes later before Robben netted his second penalty of the game after a foul on the Frenchman.
"We did not give Bayern a fight. We offered far too little today. There was no conviction in our game," said Werder coach Thomas Schaaf.