With Oakland holding a 2-0 lead and two outs in the bottom of the fifth, Gomes belted a two-run homer and Zobrist followed with a solo shot.
Zobrist's seventh inning RBI single was the sixth hit for the Rays, who won the rubber match of the three-game series at Tropicana Field to retain a share of first place in the American League East Division.
Winner James Shields (9-6) gave up three earned runs and six hits in 8 1/3 innings with no walks and seven strikeouts.
Closer Troy Percival earned his 20th save despite allowing the potential tying run to reach base with a walk.
Oakland got solo homers from Emil Brown and Carlos Gonzalez in the first and second innings, respectively, and Brown's ninth-inning sacrifice fly.
The losing pitcher was starter Greg Smith (5-9).