Garza, who pitched for the Rays for three seasons, gave up five hits and two walks in seven innings, striking out two. The game was tied at 1 when he departed.
"Cobb was really good," Brewers manager Ron Roenicke said. "Split-finger was outstanding. He was tough to hit. Garza, I thought did a great job. He matched him, and that's all you can ask."
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.
Zobrist hit his ninth homer in the sixth inning for the only run off Garza. Zobrist's double in the eighth off 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.
"His location wasn't good," Roenicke said of Smith. "He left some pitches up, and he missed some spots by a lot, which he usually doesn't do. He still throws some great pitches, but he's not consistent with it."
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.
"That's the disappointing part, when you're getting the great pitching like we've been getting and the offense cools off," Roenicke said. "We'll get it going, but it's hard to lose games when you starter goes out there and give you that kind of performance."
Grant Balfour pitched the ninth for Tampa Bay. It was the Rays' 11th win in 12 games.
"We lost to a team that's really, really hot right now," Garza said. "You make a mistake and they make you pay for it."
Brewers: The team expects to make a decision soon about the roster status of reliever Jim Henderson, who was scheduled to pitch in a rehab game late Tuesday.
Rays: Outfielder Wil Myers (broken right wrist) plans to take batting practice Saturday. Catcher Ryan Hanigan (strained left oblique) is sore after two days of batting practice and is expected to remain out until next week.
Brewers: Right-hander Yovani Gallardo (5-5) makes his first start against Tampa Bay Wednesday.
Rays: Left-hander David Price (11-7) looks to win his seventh consecutive start Wednesday.
Milwaukee has struck out 24 times in two games against the Rays.
"They're taking some extreme cuts at the ball," Cobb said. "You see it from pitch one that they have one thing on their mind."
Carlos Gomez made his first start at DH, and struck out in all four at-bats,
A RARE OCCURANCE
Milwaukee slugger Mark Reynolds had a sacrifice bunt in the fifth, which was his first since July 26, 2008, while with Arizona.