Gomez said that he was interested because his family follow Real, but that Viola was a better option for his future.
"It's true that Carlo Ancelotti wanted to sign me for Madrid," he told Kicker magazine.
"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."
Gomez has scored 25 goals in 59 appearances for Germany.