Gomez to join Fiorentina from Bayern Munich
Treble-winning Bayern confirmed that the clubs had agreed terms for the 28-year-old Germany international.
"It was Mario Gomez's wish to leave Bayern Munich for Fiorentina," Bayern's chief executive Karl-Heinz Rummenigge told the Bavarian club's official website.
Fiorentina have steered clear of big-name signings in the last few years and are battling to hold on to key player Stevan Jovetic.
Gomez will have to go without Champions League football next season as Fiorentina finished fourth in Serie A last season, one place off the Champions League playoff spot.
The Germany striker became the Bundesliga's most expensive signing when he moved to Bayern from VfB Stuttgart four years ago and has a prolific record for the Bavarians, scoring 75 goals in 115 leagues.
However, he spent much of last season as a reserve for Mario Mandzukic as Bayern claimed a Bundesliga, German Cup and Champions League treble.
Gomez, who had previously been linked with Napoli, had a disappointing first season at Bayern, managing 10 Bundesliga goals and 14 in all competitions.
He came good the following year as he scored 28 goals in the Bundesliga, and 39 in all competitions.
He followed that by notching up 26 league goals in the 2011/12 season, plus 13 in the Champions League and two in the cup, but he failed to score when it mattered, in the final against Chelsea when Bayern lost on penalties after a 1-1 draw.
Needing greater strength in depth, Bayern signed Croatia forward Mandzukic who proved more versatile than Gomez and quickly established himself as first choice.
Nevertheless, Gomez, who leaves Bayern with two Bundesliga, two Cup and one Champions League winners' medals, still managed 11 goals despite starting only nine Bundesliga games last term.
Germany coach Joachim Loew will be forced to take a greater interest in Serie A as his first-choice striker Miroslav Klose plays for Roma-based Lazio.