The 28-year old was allowed to leave the Allianz Arena after being deemed surplus to requirements by new manager Pep Guardiola, having netted 113 times in his four-year spell with the club.
Despite interest from a number of a number of European clubs, Gomez opted for Fiorentina, although he says Spanish giants Real had approached him regarding a possible switch.
"It's true that Carlo Ancelotti wanted to sign me for Madrid," he told German sports magazine Kicker.
"I was honoured by their interest, because my entire family consists of Real Madrid fans.
"However, after holding talks with Fiorentina about their plans for the future, I knew joining Fiorentina was the right choice for me."