Bayern are licking their wounds after they were dumped from the Champions League on Tuesday following a 3-2 defeat by Inter Milan in Munich.
That loss means Bayern face a season without silverware, having been knocked out of the German Cup by Schalke and lagging in fourth place in the league, 13 points behind leaders Borussia Dortmund, who host Mainz on Saturday night.
Germany striker Mario Gomez, the league's top scorer, put Bayern ahead with his 19th league goal, his sixth from a header, when he got on the end of a Ribery free-kick after just nine minutes.
But there was again disharmony in the Bayern defence, with coach Louis van Gaal having named midfielder Luiz Gustavo at centre-back in place of the suspended Breno.
Gustavo was at fault as Bayern conceded a penalty after just 14 minutes, which goalkeeper Thomas Kraft did well to save from Papiss Demba Cisse.
But Cisse was not to be denied his 18th league goal of the season when Gustavo left him unmarked and the Senegal striker turned to equalise on 17 minutes.
Bayern made sure they left Freiburg with the three points when Ribery was sent clear by Ukrainian Anatoliy Tymoshchuk and fired home on 88 minutes.
Hanover took a step closer to European football next season with a convincing 2-0 win over Hoffenheim that leaves them third in the league and on course to qualify for the Champions League.
Ivory Coast striker Didier Ya Konan proved his knee injury is behind him with a 38th minute strike -- his 12th of the season -- before Norway forward Mohammed Abdellaoue added the second in the second half.
Hamburg, whose coach Armin Veh was sacked last Sunday after their 6-0 defeat at Bayern last weekend, bounced back with a 6-2 win at home to Cologne.
Croatia striker Mladen Petric netted a first-half hat-trick to send the hosts into the half-time break with a 4-0 lead and the win lifts them up to seventh as new coach Michael Oenning got off to a winning start.
Werder Bremen look set to avoid relegation after their 3-1 win at Nuremberg kept them four points away from the relegation zone.
Eintracht Frankfurt stayed above the bottom three after a 2-1 win over St Pauli, who remain in the drop zone.
On Friday, Borussia Moenchengladbach were sent closer to their third relegation from the Bundesliga when they were beaten 1-0 by Kaiserslautern thanks to an own-goal by goalkeeper Logan Bailly.
Second-from-bottom Wolfsburg host Stuttgart on Sunday with ex-Schalke coach Felix Magath, who guided Wolves to their 2009 German league title, back at the helm after his appointment on Friday.
Schalke, who only fired Magath on Wednesday, are at second-place Bayer Leverkusen, with ex-Hoffenheim coach Ralf Rangnick set to join the Royal Blues on Monday.