Halladay beat Tampa Bay for the first time this season, and Wells homered and had three RBI as Toronto beat the AL East-leading Rays 6-2 on Tuesday night.
"It's a team that can get you at any point, so you've got to kind of be on your toes," Halladay said. "You can never get too comfortable. You've got to go out and still be aggressive. You can't change your game plan too much, but I think there's a point with teams like this that they're never out of it. It's a tough team to pitch again."
Halladay (16-9) gave up two runs and six hits in six innings. The right-hander posted a 5.32 ERA in losing his previous three starts against Tampa Bay this year.
"I honestly don't know how we beat him three times," Rays left fielder Eric Hinske said. "He's probably the best pitcher in baseball. Tonight he had a good night."
Halladay, who struck out seven, is 4-1 with a 1.96 ERA over his past five starts.
Wells had two run-scoring singles and added a solo homer in the ninth that made it 6-2. He his hitting .643 with four home runs and nine RBI over his past three games.
"When Doc is on the mound, you've just got to scratch out a few (runs) and you've got a chance to win," Wells said.
Rod Barajas hit a solo home run for the Blue Jays, who have won 10 of their past 13 road games.
Hinske drove in two runs for Tampa Bay, which has lost back-to-back games for only the second time since the All-Star break. Tampa Bay is an AL-best 47-19 at home this season.
The Rays' lead over second-place Boston dropped to 3½ games. The Red Sox beat the New York Yankees 7-3 on Tuesday.
Toronto took a 3-0 lead in the third on Lyle Overbay's two-run, two-out double. He has 11 RBI over his past 10 games.
Wells had put the Blue Jays ahead 1-0 with an RBI single in the first. He hit a run-scoring single in the seventh that put Toronto up 4-2.
Hinske pulled the Rays within 3-2 with a two-run single in the sixth.
Rays starter James Shields (11-8) went 6 2/3 innings, allowing four runs and nine hits. He had won six of his seven previous starts at home.
"Definitely the margin is slim," Shields said about pitching against Halladay. "He's one of the premier pitchers in the league. I thought I pitched pretty well tonight, but when you're facing Halladay, you've got to be in your 'A' game."
When asked what level his performance was at, Shields said " 'B' game, I guess."
"It definitely wasn't my 'A' game or else I would have won the game," he added. "You can't make too many errors when you're facing a guy like that."
Tampa Bay had runners on second and third with two outs in the second, but Halladay struck out Gabe Gross on a 3-2 pitch.
Rays catcher Dioner Navarro left in the sixth with cramping in both hamstrings. He might miss the Wednesday game.
- Halladay is 10-7 all-time against Tampa Bay.
- Rays rookie All-Star 3B Evan Longoria (right wrist) will resume hitting this week and hopes to return around Sept. 1.
- Toronto 3B Scott Rolen (left shoulder) was activated from the 15-day DL.
- Tampa Bay closer Troy Percival (right knee) had his first bullpen session since getting hurt.
- Blue Jays manager Cito Gaston is a big fan of playing indoor baseball. "I don't mind domes myself," he said. "Actually, I think all teams should have domes. Wouldn't have the rainouts. That's what I believe."
- Tampa Bay's first-round pick in the 2008 amateur draft, SS Tim Beckman, is joining Class A Hudson Valley after starting his pro career with rookie-level Princeton.
- The attendance was 13,478.