Klose goal gives Bayern advantage
Bayern went ahead with an Arjen Robben penalty in first-half stoppage time after a foul on Franck Ribery.
Per Kroldrup levelled for the Italians five minutes after the re-start, turning in the ball from close range after a corner.
Fiorentina had Massimo Gobbi sent off for an apparent elbow in Robben's face in the 73rd minute.
The Italians, already upset at the red card, were furious about the winning goal, claiming that Klose was offside when the ball was headed to him by Ivica Olic after Fiorentina goalkeeper Sebastien Frey had parried a long-range shot.
Bayern started nervously, committing several blunders in defence. At one point Martin Demichelis gave the ball straight to Marco Marchionni as he tried to start a move from defence while another mix-up led to a furious argument between goalkeeper Joerg Butt and Daniel van Buyten.
Following the goals either side of half-time, the Germans regained control of the game but were repeatedly frustrated.
Robben should have put Bayern back in front but fired wide from 15 metres after being teed up by Thomas Mueller.
Seconds before scoring the winner, Klose had the crowd howling in frustration when he fired over from inside the penalty area.