TORONTO — Sonny Gray, quite simply, was the best he’s been as a Yankee.
The righthander, who has confounded Yankees fans and the Yankees themselves with his inconsistency since being acquired before last July’s trade deadline, retired the first 12 hitters he faced Wednesday night en route to eight shutout innings.
Aaron Judge made sure the outing didn’t go to waste, crushing a two-run homer in the 13th inning to help the Yankees to a 3-0 victory over the Blue Jays at Rogers Centre.
“Quite a performance by him,” said Judge, who snapped an 0-for-15 slump with his 17th homer.
The Yankees, who start a three-game series at the Mets Friday night, improved to 31-9 since their 9-9 start to the season.
Gray, featuring a superb four-seam fastball, sinker, slider and curveball combination, allowed two hits and zero walks. He struck out eight, matching his season high, established here April 1. Gray came in 4-4 with a 5.50 ERA but 2-2 with a 3.67 ERA in five road starts.
The night marked the first time in 25 starts with the Yankees, including the postseason, that Gray did not allow a run. He lowered his ERA to 4.81 with his third strong outing in his past four starts.
“Same plan again, coming in and attacking guys and seeing what happens,” said Gray, who credited catcher Austin Romine as much as himself. “Romine did an unbelievable job. I didn’t shake him one time.”
Romine said Gray’s stuff made his job easy.
“He was doing what he wanted with the ball out there,” Romine said. “It was pretty fun to catch.”
But Gray’s counterpart, righthander Sam Gaviglio, was nearly as good, though the Yankees did get some scoring chances against him in seven scoreless innings. Gaviglio, who stranded six, allowed three hits and three walks, striking out four. The Yankees went 0-for-4 with runners in scoring position against Gaviglio, who was making his first career appearance against them. Before Judge’s homer, the Yankees were 0-for-8 with RISP and had stranded eight.
Brett Gardner singled with one out in the 13th off righthander Joe Biagini (0-5), bringing Judge to the plate. The rightfielder, 2-for-23 to that point on this trip, pounced on a hanging 1-and-2 curveball and sent it over the left-centerfield wall.
“I just know in the back of my mind when I’ve faced him in years past, he does have a big breaking ball,” Judge said of his approach. “Just stick on fastball/slider away and try to do some damage on that, but if I see the curveball pop up, put a good swing on it.”
Giancarlo Stanton added his 14th homer, a two-out laser to left, which departed his bat at 119.3 mph, the hardest-hit homer in the majors this season, to make it 3-0.
“We talked on the bench, I think that’s maybe the hardest ball I’ve ever seen hit,” Aaron Boone said. “It was killed. That took me back a little bit.”
Aroldis Chapman allowed a one-out double to Kendrys Morales in the bottom half but still picked up his 15th save.
Before the 13th it was all frustration for an offense that appeared as if it would be shut out for the first time this season.
Miguel Andujar, the major-league leader among rookies with 29 extra-base hits, made it 30 with a leadoff double in the 10th against Tyler Clippard. But Romine struck out, Gleyber Torres flied to left and lefty Tim Mayza got Gardner to line out to left.
Stanton worked a two-out walk in the 11th against John Axford and two wild pitches put him on third. Gary Sanchez struck out, however, extending his recent stretch to 4-for-41 that has dropped his average to .201.
But Gray and relievers Chad Green, Dellin Betances, David Robertson (4-2) and Chapman combined for five shutout innings, striking out a total of seven.
“About perfect,” Boone said of his pitching staff. “Sonny set the tone.”