Marco Scutaro drove in two runs for Toronto, which avoided a three-game sweep.
"It was a game we needed to win," Wells said. "You never like getting swept and you obviously never like getting swept at home. We've had some tough losses, they've been hard to watch from afar. It was a good win today."
The victory kept the Blue Jays (33-32) from falling back below .500, but Wells wasn't satisfied.
"We've got to play better baseball, that's the bottom line," Wells said. "You don't want to get too far back this early. We need to make a run."
Luke Scott hit two homers for the Orioles, a solo shot in the second inning and a two-run drive in the sixth. It was the third multihomer game of his career.
"The difference in the game was they put zeros up after they scored and we didn't," Orioles manager Dave Trembley said.
Halladay (8-5) allowed four runs and eight hits in 7 2/3 innings and has not lost since May 9 at Cleveland. He walked none and struck out seven.
Halladay is 17-4 with a 2.93 ERA in 27 games against Baltimore.
"To be able to have a game like today where we did battle back, we did overcome some things, is good for us," Halladay said. "Hopefully, it can carry us forward."
Scott Downs got one out in the eighth and B.J. Ryan worked the ninth for his 13th save in 15 opportunities. Ryan had blown his previous two chances, June 1 at the Los Angeles Angels and June 5 at Yankee Stadium.
"To get out there and finish it off was good," Ryan said. "It was well-needed right now."
Wells was expected to miss six to eight weeks after he broke his left wrist making a diving catch at Cleveland on May 9. He was activated from the disabled list Saturday after a 26-game absence and has gone 5-for-7 since returning.
In the first season of a $126 million, seven-year contract, Wells credited an aggressive rehabilitation regimen for helping him regain his power stroke.
"The big thing for me and the training staff was trying to get the strength back as quickly as possible," he said. "After a couple of weeks, they allowed me to start doing grip strength and things like that. It's my bottom hand, that's what's supposed to do all the work when you're hitting. We started strengthening right away and it's helping right now."
Trailing 4-2, the Blue Jays scored three times in the sixth against reliever Matt Albers (3-2).
"They took advantage of (Albers') inexperience there," Trembley said. "He got distracted with some base runners and really changed his tempo. When he changed his tempo, I thought his delivery got out of sync."
Scott's second-inning homer gave Baltimore a 1-0 lead, but Toronto scored twice in the bottom half. Scutaro hit an RBI single and Wilkerson came home on the back end of a double steal, sliding in ahead of the throw from second baseman Brian Roberts.
The Orioles tied it at 2 on Melvin Mora's RBI single in the third, then went ahead 4-2 on Scott's second homer in the sixth.
Making his second start of the season, Baltimore's Radhames Liz allowed two runs and four hits in five innings. He walked three and struck out three.
Baltimore outfielder Jay Payton was ejected for arguing with plate umpire Bill Miller after being retired on a foul popup in the fourth. Barajas reached around the screen behind home plate and plucked Payton's popup out of the air just above the hands of a fan.
A frustrated Payton slammed his helmet and bat to the ground in anger, and had to be restrained by Trembley as he argued with Miller. Payton was ejected when he continued arguing after walking away. Adam Jones took over in center field.
"My first at-bat there was a 2-0 pitch that I didn't argue because it was 2-0," said Payton, who was ejected for the second time this season. "Then my next at-bat I got another pitch called, so I just argued balls and strikes. You're not allowed to argue balls and strikes up here. They'll toss you pretty quick for that."
- Toronto placed OF Shannon Stewart (sprained ankle) on the 15-day disabled list and recalled OF-INF Joe Inglett from Triple-A Syracuse. Stewart will have an MRI exam Monday.
- Baltimore LHP Adam Loewen (left elbow) has resumed throwing and will begin a rehab assignment this week.
- The Orioles wore black armbands on their left sleeve in honor of sportscaster and minority owner Jim McKay, who died Saturday.