Toronto pulled within 7 1/2 games of Boston in the wild-card race. The Blue Jays have seven games remaining, and the Red Sox have eight.
Boston fell 2½ games back of AL East-leading Tampa Bay, which beat Minnesota 7-2, and its wild-card lead was cut to 6½ over the New York Yankees, who won 1-0 against Baltimore.
"We're still trying to catch Tampa," Red Sox outfielder Jacoby Ellsbury said. "It would have been nice to have won today but we know we've still got [eight] more."
Halladay (19-11) won for the first time in three starts, allowing three runs and six hits. He struck out three to give him 201 for the season, passing 200 for the second time in his career.
"He's always one pitch away from a double play," Boston manager Terry Francona said. "He sinks the ball so well, he cuts it. He threw a couple of changeups today. That's why he's got 19 wins. He's done it against everybody. He's got tremendous stuff."
A high pitch count kept Halladay from adding to his major league-leading 237 innings. Boston's batters worked him hard in the early going.
"I don't think I was around the zone as much as I normally am," said Halladay, who threw 61 of his 106 pitches for strikes. "I kind of compounded the problem myself. They're a good team. They're going to make you work either way."
Alex Rios' RBI single gave Toronto a 1-0 lead in the first, and the Blue Jays added four more in the second. Rios drove in another run with a fielder's choice, Marco Scutaro doubled home a pair and Jose Bautista had an RBI single as Toronto batted around.
"You can't spot a pitcher like Halladay five runs in the second inning and hope to have a chance to win," Lester said.
Boston cut it to 5-3 with a three-run third and put runners on second and third with two out in the eighth. Alex Cora hit a sharp grounder up the middle but reliever Brandon League made a nice stop to end the inning.
"[Cora] was about two inches away from a hit," Francona said.
Lester struck out four and walked three in another shaky road outing. He is 10-1 with a 2.54 ERA in 16 starts at Fenway Park this season, but just 5-5 with a 4.09 ERA in 16 road starts.
Boston OF J.D. Drew suffered back spasms while swinging Friday and remains unable to play. Drew, who has been sidelined since Aug. 17, will be re-evaluated when Boston returns home Monday. ... Ellsbury extended his hitting streak to 11 games with a leadoff single in the first. ... Bay hit 22 homers with Pittsburgh before the deal. ... Halladay struck out 204 in 2003, when he won the AL Cy Young Award. ... Halladay and A.J. Burnett have combined for 37 wins this season, tying the highest single-season total in Blue Jays history. Jack Morris (21) and Juan Guzman (16) combined for 37 wins in 1992. ... Halladay improved to 3-2 with a 2.56 ERA in five starts against Boston this season.