Halladay (11-6) won his third straight start and threw his major league-leading seventh complete game. He struck out eight and walked one. The right-hander, who has 11 career shutouts, is 8-1 over his past 12 starts.
The Blue Jays extended their home winning streak to a season-high six games.
Playing in their third city in as many nights, the Yankees put just two runners in scoring position against Halladay. Leadoff hitter Brett Gardner was hit in the left leg with a pitch and stole second in the first, but Halladay got Derek Jeter to ground out and struck out both Bobby Abreu and Alex Rodriguez looking to end the inning.
Jeter hit a ground-rule double in the ninth but Abreu ended a 12-pitch at-bat by striking out before Rodriguez lined out to first to end the game.
The only other hit was Alex Rodriguez's one-out single in the fourth, a liner to center that dropped in front of Brad Wilkerson.
The Yankees managed just two other baserunners against Halladay. Robinson Cano drew a two-out walk in the second, and Abreu was hit by a pitch in the sixth, but was caught stealing to end the inning.
Yankees right-hander Joba Chamberlain lost for the first time in eight starts since joining the rotation on June 3. Chamberlain (2-3) allowed three runs and seven hits and matched season highs by striking out nine in 6 2-3 innings.
Toronto opened the scoring in the third when Adam Lind led off with a single and went to second on a wild pitch. Joe Inglett advanced Lind to third with a bunt and was safe at first when catcher Jorge Posada's underhanded throw sailed over the head of Wilson Betemit at first. One out later, Lyle Overbay's single scored Lind and sent Inglett to third. Stairs followed with an RBI fielder's choice.
Barajas hit a solo homer to left in the sixth, his eighth. It was just the second homer Chamberlain has allowed since becoming a starter.
Chamberlain left after Lind reached on a bloop double that Cano lost in the twilight. Billy Traber came on and got Inglett to hit a comebacker.