Bayern Munich left it late but Franck Ribery's 88th minute strike ensures that the champions stay in the hunt for third spot.
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 19th goal of the campaign.
Freiburg equalised nine minutes later as Bayern's defensive frailties returned to haunt them. After the visitors' backline 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 18th 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 14th 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.
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 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 third-placed 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.