Gomez, who came off the bench in the 67th minute, cancelled out Arturo Vidal's third-minute opener as Thursday's first leg in Turin finished 1-1.
Juve had plenty of chances to double their lead and were unlucky not to go into the interval 2-0 up after Vidal's header struck the crossbar.
Fiorentina went into the all-Italian showdown determined to bounce back from Sunday's 1-0 defeat at Juve in Serie A, a result that all but ended their hopes of playing Champions League football next season.
The hosts rested Serie A's top scorer Carlos Tevez and instead played with Pablo Osvaldo and Sebastian Giovinco in attack.
The home side had a dream start as Giovinco controlled Claudio Marchisio's cross and left it in the path of Vidal, who struck the ball past Fiorentina goalkeeper Norberto Neto.
Fiorentina almost pulled level in the 18th minute but Matias Fernandez's attempt was kept out by Juventus goalkeeper Gianluigi Buffon.
Kwadwo Asamoah then did well to clear the rebound with Fiorentina's Borja Valero ready to pounce.
In the 26th minute, Neto saved Vidal's powerful header from Marchisio's cross.
Juve continued to press forward and in the 38th minute, Vidal got past his marker and headed Andrea Pirlo's precise cross past Neto only to see his effort hit the crossbar.
On the stroke of half-time, Valero's goal-bound attempt towards the far post was blocked by Juve defender Angelo Ogbonna with Buffon off his line.
The visitors struggled to break down Juve's backline early in the second half.
The hosts had the first chance after the break with Pirlo's free-kick forcing Neto to make a diving save.
In the 73rd minute, Gomez's central header from Nenad Tomovic's cross was saved by Buffon.
Gomez made no mistake soon after when he controlled Josip Ilicic's pass in the area and hit a right-footed shot past Buffon.
At the other end, substitute Paul Pogba surged inside the area and his left-footed attempt went just wide.
Three minutes from time, Buffon had to fully stretch to clear substitute Juan Vargas' 30-yard bullet strike as the Juve captain made sure his team travels to Florence next week with all to play for.