Red Sox reliever Andrew Miller threw two bad pitches in a row in the eighth inning that hit batters and put the go-ahead run in scoring position.
Miller's third mistake of the inning was even more costly.
Boston's left-hander tried to sneak a fastball past Coco Crisp down and away but left the pitch up in the strike zone, and Crisp made Miller and the Red Sox pay for it.
Miller (2-5) hit Kyle Blanks and Alberto Callaspo with back-to-back pitches with one out in the eighth, then gave up a two-run single to Crisp in Boston's 4-3 loss to Oakland on Friday.
"You just can't afford to hit those two guys in that part of the lineup right there," Miller said. "(With Crisp), 2-2 pitch, you want to go right after him. In hindsight, I should have thrown a breaking ball or thrown something in. I didn't."
Miller nearly got out of the inning. He struck out Nick Punto after hitting Blanks and Callaspo, then worked a 2-2 count to Crisp before the A's center fielder lined the game-winning hit to right. Blanks easily scored ahead of the throw from Brock Holt.
"I thought overall our bullpen did an outstanding job of coming in and making pitches when needed," Boston manager John Farrell said. "We left a number of people on base, which is once again the story in this one."
Both teams squandered multiple scoring opportunities.
The Red Sox left two on in the fourth and failed to score after loading the bases in the fifth. The A's had two on in the third, fourth and seventh but stranded them each time.
Six of Boston's last seven games have been decided by one run. The Red Sox are 3-3 in those games.
"One run shy again," outfielder Jonny Gomes said. "We're right there. We just got to find a way to capitalize and get one more run than that."
Josh Donaldson hit a three-run home run, his first in two weeks, to help the A's extend their winning streak to four games. Oakland also owns the best record in the majors.
"At the end of the year to be able to say that ... that would be something at that moment," Crisp said. "I'm happy with having the best record in baseball now but we can't get ahead of ourselves."
Sean Doolittle pitched the ninth for his 10th save. The A's closer also extended his scoreless streak to 23 1/3 innings, the longest active mark in the AL.
Oakland only managed two hits off Boston starter Felix Doubront and had stranded eight runners before Crisp delivered the game-winner.
The A's have won the first two of this series after dropping two of three to the Red Sox at Fenway Park last month.
Oakland starter Brad Mills struck out the side in the first before Boston loaded the bases with one out in the second following an error by Oakland second baseman Punto. Jackie Bradley Jr. hit a two-run single to drive in Mike Napoli and Jonny Gomes.
It could have been worse.
A's center fielder Craig Gentry made a diving catch on Holt's sinking liner, then threw to second to double off Stephen Drew.
Boston tied it on David Ortiz's RBI single in the third.
Mills, acquired in a trade from Milwaukee earlier in the week, had not pitched in the majors since 2012. He walked four and struck out four before leaving after pitching out of a bases-loaded jam in the fourth.
Donaldson's three-run homer off Doubront in the first was his first since June 6.
Doubront didn't allow another hit after that but left without a decision. He struck out four and walked four over 4 2-3 innings.