OAKLAND, Calif. -- The Athletics are finally starting to do the little things they failed to do early in the season, like stringing together timely hits with runners in scoring position and playing flawless defense.
Getting a crisp outing from right-hander Sonny Gray certainly helps, too.
"We're getting leads now, we're holding them, we're getting better at-bats, we're getting breakthrough hits, cleaner games defensively for the most part," A's manager Bob Melvin said. "A lot of things that have been our Achilles heel, we're starting to get better at."
Gray (6-2) retired 11 straight after walking Brett Gardner to lead off the game. Brian McCann ended the streak with a leadoff home run in the fifth -- his fourth in four games -- and the Yankees scored again the sixth but managed little else against Gray and two relievers.
It was a sharp bounce back for Gray, who struck out five, walked two and allowed four hits and two runs.
Oakland's young right-hander, who left his previous start after being hit in the right ankle by a line drive, also benefited from an unusually crisp defense behind him.
The A's went into the game leading the majors with 51 errors but made several stellar plays, including a diving stop and throw by third baseman Lawrie to rob Chris Young of a hit in the eighth.
"Even through the rough stretch we went through, we always were trying to be positive around here," Gray said. "We knew we were a lot better team than the way we've been playing."
Brett Lawrie added a two-run home run for the A's.
Oakland entered the night with the worst record in the American League but won for the fifth time in seven games.
Alex Rodriguez singled in the ninth to extend his hitting streak to 13 games for New York.
Vogt's two-run double in the third off Yankees starter Chris Capuano (0-3) capped a four-run inning and gave Gray all the run support he needed.
"Other than that inning, he was pretty good," New York manager Joe Girardi said of Capuano. "He battled out of a couple little jams that he had, and he was pretty good."
Tyler Clippard retired one batter for his sixth save.
New York has lost two straight after sweeping Kansas City on the road.
McCann led off the fifth with his eighth homer of the season to trim Oakland's lead to 4-1. He joins Mike Stanley (1993) as the only catchers in franchise history to hit a home run in four consecutive games.
Brett Gardner's RBI grounder in the sixth made it 4-2.
Lawrie homered off Esmil Rogers in the eighth.
Yankees: CF Slade Heathcott is headed for the disabled list with a quad strain. OF/1B Ramon Flores is expected to be called up from Triple-A Scranton/Wilkes-Barre to take Heathcott's roster spot. ... Girardi confirmed that RHP Masahiro Tanaka will make his first start of the season Wednesday in Seattle. ... INF Gregorio Petit (bruised hand) took batting practice before the game.
Athletics: LHP Eric O'Flaherty (strained shoulder) is scheduled to pitch one inning Saturday for Single-A Stockton in what could be his final rehab appearance. ... RHP A.J. Griffin (elbow surgery) will throw a bullpen session then begin his rehab with a start in Stockton on Tuesday. ... OF Coco Crisp (cervical strain) will undergo a bone scan Monday before receiving an epidural in Los Angeles.
Yankees: RHP Nathan Eovaldi (4-1) has given up 19 earned runs over his previous six starts, raising his ERA from 3.12 to 4.27.
Athletics: RHP Jesse Hahn (2-4), who pitches against New York on Saturday night, has allowed seven unearned runs this season, the most in the AL.
2021 MLB playoffs: NLCS MVP Eddie Rosario helps send Braves to first World Series since 1999
Rosario was a fourth-round draft pick by the Minnesota Twins in 2010 and has basically flown under the radar ever since. He was named NLCS MVP after the Braves defeated the heavily favored Dodgers to advance into their first World Series since 1999.
Braves vs Astros: A World Series 6 decades in the making
Freddie Freeman swinging onto baseball’s biggest stage for the first time, Jose Altuve & Co. back for more. Luis Garcia, Framber Valdez and a fresh set of Houston arms facing Ozzie Albies, Austin Riley and these eager, young Atlanta bats.
2021 MLB playoffs: Three questions for Los Angeles Dodgers as World Series title defense ends in defeat
There will be no Fall Classic repeat this October. So what's next for the Dodgers following their NLCS loss to the Braves?
Braves advance to 1st World Series since 1999 after dramatic finish
Dansby Swanson makes an incredible sliding stop and throw to first base for the final out to seal a 4-2 win for the Braves over the Dodgers to advance to their first World Series since 1999.
Atlanta Braves back in World Series for first time since 1999 after upsetting Dodgers in NLCS
Eddie Rosario's three-run homer in the fourth inning proved to be the difference as the Braves beat the Dodgers 4-2 in Game 6 of the NLCS.
2021 MLB playoffs: Schedules, postseason bracket, analysis and updates
All the latest information about the teams, storylines and highlights of the 2021 MLB postseason, from the start of October through the World Series.