Gray rattled off eight solid innings, allowing two runs and four hits Friday night, helping the A's secure back-to-back home wins for the first time all season.
The club has won five of its last seven, after dropping 14 of its previous 16 contests.
"Overall I'm very happy with the outcome," said Gray, now 6-2, "and it's been good to win a couple games in a row."
"Sonny's just so special, and what he did tonight was very impressive and exactly what we needed to continue on this path," said Stephen Vogt, who backed Gray with several key picks at first base. "We've been playing such good baseball, and to have a start like that from your ace is huge."
It's also expected at this point, with Gray having allowed no more than two earned runs in nine of his 11 starts this season for an American League-leading 1.82 ERA. The right-hander's first All-Star nod seemingly awaits.
"In a season that's been kind of tough to get wins, he gives you a chance every time he's on the mound," said catcher Josh Phegley. "We're in the game every time he's on the mound, if not winning when he comes out. He's been that anchor in the starting rotation."
Gray took a liner off his right ankle in his last start, forcing him to exit after five scoreless innings in St. Petersburg, but it was of no consequence Friday. He faced the minimum through four innings on just 40 pitches and didn't allow a hit until Brian McCann notched his fourth home run in as many games to lead off the fifth.
The Yankees posted one more run off Gray in the sixth, but he held them scoreless the rest of the way. His teammates provided plenty support, combining for four runs in the third and two more in the eighth, courtesy of a Brett Lawrie two-run homer.
"You don't want to let up, of course, but you know they're not going to get to Sonny, so we were pretty comfortable, and I think that's when we can settle down, and the bats come more alive, and you can kind of feel that energy," said Phegley. "It's that confidence and knowing that we can beat teams, and Sonny gives us that confidence when he's on the mound."
Jane Lee is a reporter for MLB.com. Read her blog, Major Lee-ague, follow her on Twitter @JaneMLB and listen to her podcast. This story was not subject to the approval of Major League Baseball or its clubs.