Gilmartin had his contract selected by the Rays on Friday, Neil Solondz of the Rays Radio Network reports.
The 30-year-old was outrighted to the alternate training site in late August but will return to the 40-man roster with a week left in the regular season. Gilmartin has surrendered four runs on seven hits with a 5:4 K:BB over 4.1 innings this season.