Gomez, who turned 32 in December, appeared in 105 games for Texas last season and was the primary center fielder after All-Star Ian Desmond left in free agency. Gomez is expected to play right field in Tampa.
A right-handed batter, Gomez had a .255 batting average with 17 home runs and 51 RBIs last season.
The Dominican Republic native came to Texas as a free agent in 2016 after being released by the Houston Astros amid a seasonlong slump. He rebounded to hit .284 with eight homers and 24 RBIs in 33 games over the next month as the Rangers won the AL West title. His MLB résumé also includes stints with Minnesota, Milwaukee and the New York Mets. He won a Gold Glove in 2013 while playing center for the Brewers.
An All-Star in 2013 and '14 with Milwaukee, Gomez has a .257 average with 133 home runs and 504 RBIs in 10 big league seasons.
The move comes a day after Tampa Bay traded Steven Souza Jr. to the Arizona Diamondbacks as part of a three-team deal with the New York Yankees. The Rays have made a series of cost-cutting moves in recent weeks, also trading pitcher Jake Odorizzi and designating Corey Dickerson for assignment.