Zobrist hit his ninth home run in the sixth inning for the only run off Milwaukee starter Matt Garza. Zobrist's double in the eighth off reliever Will Smith (1-3) put the Rays ahead for the first time. Pinch-hitter Logan Forsythe followed with another RBI double and the Rays went on to a four-run inning.
Cobb (7-6) gave up three hits and two walks in winning his third straight start. The right-hander is 5-0 in his last six starts.
Garza gave up five hits and two walks in seven innings, striking out two.
The Brewers, who have lost four of five, have scored two runs and had 12 hits in their last three games while striking out 30 times.