The club have agreed a deal in principle with the Viola and the move will be finalised in the coming days
The Germany international struggled for regular first-team football at the Allianz Arena last season after losing his starting berth to team-mate Mario Mandzukic.
The move will be officially completed within the next couple of days following talks on Monday between Bayern CEO Karl-Heinz Rummenigge and Viola president Andrea Della Valle.
"It was the desire of Mario Gomez to leave Bayern Munich for Florence. We have now complied with his wish," Rummenigge told the club's official website.
"He has made a major contribution to two German championships and two DFB Pokal victories. The highlight was of course the Champions League victory and winning the treble last season.
"I would like to thank him for his Bayern performances. On behalf of the club, I wish him luck and success in Florence!"
Gomez became the most expensive player in Bundesliga history when he signed for Bayern from Stuttgart in 2009 for €30 million. Since then Javi Martinez and Mario Gotze - both Bayern players - have surpassed that milestone.
Gomez played 174 games for Bayern, scoring 113 goals.
The striker becomes Fiorentina's eighth acquisition this summer having landed among others, goalkeeper Gustavo Munua; defender Marcos Alonso; and midfielders Massimo Ambrosini, Juan Cuadardo and Joaquin.