Klose headed home in the 89th minute after a long-range shot from Dutch international winger Arjen Robben had run loose, but replays showed that the German striker was yards offside.
The strike gives the Bundesliga outfit plenty to do when the two sides meet in Florence on March 9, with the Italians clinging on to a precious away goal, gifted to them by a defensive comedy of errors from the usually tight Germans.
After the game, Klose admitted he was offside, saying: "I haven't seen the replay yet, but I felt like I was offside."
Bayern's coach Louis van Gaal said he could understand the furious reaction of the Italians when the goal went in.
"Yes, it was offside. I would also have been very angry but I think the referee had a very difficult match," he said.
Van Gaal paid tribute to the Serie A outfit, who had been widely written off before the game, coming into the match without a win in their last five matches, and slipping to a disappointing 11th place in the league.
"Tactically, they played very well. We ran too much with the ball and hit too many long balls. Fiorentina really had no chances but still managed to score a goal and that is disappointing," he said.
Bayern Munich president Karl-Heinz Rummenigge also acknowledged his team's good fortune, but said they would head to Florence full of confidence.
"We have won. We can be happy and we can fly with optimism to Florence," he said. "Yes, it was offside ... we were lucky to get such a goal, but it was deserved," he added.
Understandably, the Italians saw the situation differently.
"How can this happen in the last 16 of the Champions League? I could see it was offside from the bench," fumed Italian international midfielder Riccardo Montolivo.
Klose's controversial header was the culmination of a frantic last 20 minutes which produced a myriad of chances for the home side as they pressed hard for the winning goal against an Italian team reduced to 10 men.
After 72 minutes, defender Massimo Gobbi was handed a straight red card for a blatant elbow in Robben's throat.
Bayern took the lead on the stroke of half-time through a Robben penalty, his sixth goal in as many games but the first in this season's Champions League campaign.
The spot kick, awarded after Bayern's French star Franck Ribery was unceremoniously upended in the penalty area, capped a largely frustrating first half as Bayern struggled to break down a well-organised Italian defence.
But Bayern's joy was short-lived as a defensive mix-up handed Fiorentina an equaliser five minutes after the restart.
The German giants failed to clear a corner and Fiorentina's Danish international defender Per Kroldrup pounced in the ensuing goal-mouth scramble, poking the ball home from close range.
In a desperate quest for a winner, van Gaal rang the changes with a double substitution after 65 minutes, pulling off Gomez and Thomas Müller and bringing on Klose and Croatia's Ivica Olic.
But despite numerous chances created by Bayern's potent attacking force in a hectic second half, no one was able to deliver a telling blow until Klose's last-gasp effort.
Nevertheless, Fiorentina's away goal means they still have all to play for in the Stadio Artemio Franchi as Bayern hunt their fifth trophy in Europe's elite club competition, a point Robben acknowledged after the game.
"We have a slight advantage but it didn't turn out as we would have wished. It was a difficult match against a strong side, tactically very strong," he said. "We have to play better (in the return leg)," the former Chelsea man added.