The veteran wingers, both of whom are set to leave Bayern at the end of the season, came off the bench as Bayern made heavy weather of a crucial victory over the Bundesliga's bottom club.
Ribery scored what may be his last ever goal at the Allianz Arena to seal a 3-1 win and put Bayern five points clear of title rivals Borussia Dortmund, who face a tough trip to Werder Bremen later on Saturday.
Robben, who had not played since November, told Sky that his cameo appearance would not be his last for Bayern.
"I always said I didn't want to come back just to wave to the fans and say goodbye. There are two games left and the German Cup final, so there is more to come," he said.
Hanover kept Bayern at bay for nearly half an hour before Robert Lewandowski headed the hosts ahead from close range and Leon Goretzka curled the second in off the post.
The visitors hit back after half-time with a Jonathas penalty, the result of a highly controversial handball decision from VAR against Jerome Boateng.
Ribery secured the win six minutes from time, and the home fans had more reason to cheer a few minutes from time when Robben was brought on moments later.
Borussia Moenchengladbach and Hoffenheim both stumbled in the race for the top four, as they shared the points in a 2-2 draw.
Matthias Ginter cancelled out Pavel Kaderabek's opener, before Nadiem Amiri restored the lead with a fine volley. Josip Drmic saved Gladbach's Champions League hopes with a late equaliser.
At the bottom of the table, relegation looms ever larger for Nuremberg, after goals from Felix Klaus and Marcel Tisserand saw them lose 2-0 in Wolfsburg.
They and Hanover were spared relegation for at least another week, however, as Hertha Berlin won 3-1 at home to Stuttgart, who remain in the relegation play-off place.
Vedad Ibisevic ended Hertha's 395-minute goal drought when he prodded them ahead on 40 minutes.
Goals from Ondrej Duda and Salomon Kalou sealed the win for Hertha, despite a late consolation header from Mario Gomez.