After more than a decade at Bayern, Ribery, 35, made another strong argument for an extension to his contract, which expires in June, with a double in Frankfurt having also scored in Wednesday's 1-0 victory over RB Leipzig in Munich.
“The last few games have shown what Bayern can do — I want to praise Franck, he did exceptionally well,” said coach Niko Kovač with Bayern having won their last five league games, scoring 13 goals.
Ahead of the four-week winter break, Rafinha scored a late third as Bayern trimmed the gap to Dortmund, who beat Borussia Mönchengladbach 2-1 on Friday.
It was also a winning return to Frankfurt for Kovač, who masterminded Eintracht's shock 3-1 defeat of Munich in the German Cup final last May in his last match before taking charge of the Bavarian giants.
After an intense opening half-hour when both sides had clear chances, Bayern broke through when Thomas Müller found Robert Lewandowski in the box and the Poland striker flicked the ball onto Ribery to tap home on 35 minutes.
Müller hit the crossbar just before the break while Thiago Alcantara had a penalty appeal for handball turned down with 20 minutes left as Bayern maintained the pressure.
Ribery netted for the second time when he casually fired in off the post after exchanging passes with Joshua Kimmich on 79 minutes.
Rafinha scored a minute from time when his cross-shot flew over Trapp's reach and into the Frankfurt net.
Leipzig leave it late
Earlier, RB Leipzig substitute Bruma helped fire his team back into the Bundesliga title race with a dramatic late winner in a 3-2 home victory over Werder Bremen.
Fourth-placed Leipzig are now just two points behind third-placed Mönchengladbach, after Bruma struck three minutes from time at Leipzig's Red Bull Arena.
The hosts, who signed Mali midfielder Amadou Haidara, 20, from sister club Red Bull Salzburg on Saturday, made hard work of the win, throwing away a two-goal lead after Lukas Klostermann and Timo Werner put them 2-0 up at the break.
Klostermann thundered his goal in off the underside of the crossbar before Werner showed lightning-quick reactions to poach their second a minute before half-time after a disastrous back-pass by Bremen captain Max Kruse.
However, Kruse made up for his earlier error with his fourth goal of the season by blasting home on 67 minutes.
The American teenage international Josh Sargent then finished off a counter-attack to equalise with 13 minutes remaining in a tense finale.
Leipzig were not finished, however, and Bruma coolly slotted in the winning goal between the legs of Bremen goalkeeper Jiri Pavlenka.
Schalke, who face Manchester City in the last 16 of the Champions League, are 13th after their first league win in five games with a 3-1 victory at Stuttgart as substitute Ahmed Kutucu made sure of the win with the Royal Blues' third goal 12 minutes from time.
Fortuna Duesseldorf built on Tuesday's shock 2-1 win over Dortmund with a 1-0 victory on the road at Hanover 96 with substitute Oliver Fink scoring their 92nd-minute winner to secure a third straight three points to lift them up to 14th.
Fortuna and Bayern are the only teams to have taken the maximum nine points from the three games in the last week.
Bayer Leverkusen are ninth after teenager Kai Havertz scored twice in their 3-1 home win over Hertha Berlin.
Bottom side Nuremberg are winless since late September after losing 1-0 at home to Freiburg, who took the three points thanks to a first-half header from defender Manuel Gulde.