Frenchman scored late on
The Bundesliga's two leading goalgetters this season, Mario Gomez and Papiss Cisse, traded goals before the French winger decided the game.
After a reasonably subdued start to the game, the reigning champions opened the scoring in the ninth minute through a set-piece. Franck Ribery delivered the free-kick onto the head of Mario Gomez, whose intelligent run across Freiburg centre-back Omer Toprak enabled him to guide the ball past a helpless Oliver Baumann for his nineteenth goal of the campaign.
Freiburg equalised nine minutes later as Bayern's defensive frailties returned to haunt them. After the visitors' defence failed to deal with the initial ball in from the right, Luiz Gustavo suffered a momentary lapse in concentration and lost Papiss Demba Cisse, who poked the ball home from close range past Kraft. It was Cisse's eighteenth of the term, a record for any Freiburg player in one season.
Just as the game looked to be heading for a draw as both sides failed to take their chances, French winger Franck Ribery popped up with a dramatic winner in the 88th minute. Cutting in from the left, he rifled a right-footed shot into the bottom corner past Baumann, sparking wild celebrations from the Bayern players, who were only too aware of the significance of a win today.
Die Breisgau-Brasilianer also wasted another opportunity to equalise in the fourteenth minute after a controversial decision from referee Peter Gagelmann. Bayern goalkeeper Thomas Kraft was adjudged to have brought down Cedric Makiadi. Kraft recovered to save his second penalty of the season, clutching onto a poor effort from Cisse.
In a blow for the visitors, Arjen Robben had to be replaced by Hamit Altintop on the half-hour after picking up an abductor injury. Freiburg were the better side and had the chance to take the lead five minutes later but Makiadi did not know what hit him and he shanked the rebound wide after Daniel Caligiuri's speculative shot struck the post.
Out of the Frei-ing pain | Cisse equalises for the home side
Louis van Gaal's men came out firing on all cylinders after the break with Toni Kroos' shot heading towards goal before Gomez's intervention took it wide. Cedric Makiadi and Hamit Altintop also failed to give their sides the lead, both missing gilt-edged opportunities from close range. Oliver Baumann made two excellent second-half stops to deny Altintop and then Klose but he was powerless to prevent Ribery's winner.
Bayern remain in fourth spot and are still just two points off Hannover while Freiburg drop below Hamburg to eighth. When the Bundesliga resumes in a fortnight after the international break, Bayern will host bottom of the table Borussia Moenchengladbach and Freiburg will travel to Mainz.