Trailing, 5-1, in the sixth, Houston put a four-spot up to pull even, backed by a solo home run by Marwin Gonzalez, making his first start since right oblique soreness sidelined him Sept 3, and a two-run double from Tyler White.
Then in the seventh, Jose Altuve worked himself masterfully around the bases, catching Brandon Phillips off guard with a drag bunt to reach first and then advancing to second on the third baseman's throwing error.
After a passed ball moved Altuve to third, Yuli Gurriel hit a grounder to Xander Bogaerts, who fired home to try to stop the run from scoring.
The throw was a bit high, so the Astros second baseman slid low and slapped the plate as Sandy Leon was coming down to make the tag.
"It was a really close play. In the moment I thought I was safe," said Altuve. "Obviously that was a big, big play for us. If we got it our way, then the game would have been different."
While the initial play on the field was called an out, the Astros asked for a replay review and felt from what they saw that things would clearly be overturned, but the call stood.
"He did get in there," manager AJ Hinch said. "It's clear as day. I'm tired of these questions because replay is set up for precisely that type of play. We feel like we have clear evidence. There is a gap between the tag, his hands on the plate. Continually it gets harder and harder and harder to get a call overturned if they can just simply say it stands. It sounds like sour grapes after a loss, but it's a tough loss for us."
"In situations like that where clearly he hadn't put the tag on when his hand was on the plate, you would like an explanation," Astros starter Dallas Kuechel added.
Instead of Houston playing out the final frames with a lead, the game went into the ninth inning tied at 5, and the Red Sox finally took advantage.
With two outs and runners at first and second, Mitch Moreland looped an inside-out single into left field, which allowed pinch-runner Tzu-Wei Lin, on for J.D. Martinez, to come around and end the game.
"Bloop to right, ground ball up the middle, bloop to left, we lose," said Hinch. "That is a little bit of bad luck, but it's also good hitting."
Keuchel allowed five runs on nine hits over his six innings, his lone mistake a hanging changup to Martinez, who deposited a three-run shot into the Green Monster seats for his 40th home run of the season.
Hector Rondon was hooked with the loss after coming on in the ninth inning.
MOMENTS THAT MATTERED With the bases loaded and one out, reliever Tony Sipp came on to try and minimize the damage. Facing Blake Swihart, he bounced a splitter hard in the dirt, but Martin Maldonado, who entered to catch in the seventh inning, made a sensational block to keep the ball from rolling to the backstop. Sipp then took care of the rest, striking out Swihart and Christian Vazquez to end the threat and keep things tied.
"That was one of the best you'll see," Hinch said of Maldonado's block. "You don't see Tony spike the split that far and you certainly don't see catchers that are able to just put their body in front of it and block it in Fenway with the bases loaded and the game on the line. It was pretty good."
SOUND SMART Alex Bregman extended his hitting streak to all eight September games with his Major League-leading 49th double on a bloop to right field that Mookie Betts and Martinez watched drop at their feet. During the eight-game streak, the Houston third baseman has 13 hits, 11 for extra bases (five homers, six doubles). Bregman's 80 extra-base hits on the year are tops in the Majors over Martinez's 77.
HE SAID IT "You got your money's worth here. … It's just two really good teams going at it. If you're lucky enough to get a ticket, it's a nice weekend." -- Keuchel, on the tight series
MITEL REPLAY OF THE DAY In the bottom of the fifth inning, the Red Sox challenged an out call on Andrew Benintendi at first base. After a 36-second review, it was determined that Benintendi beat the throw from Altuve, and the call was overturned.
UP NEXT The Astros move on to Detroit for a three-game set starting Monday with right-hander Justin Verlander making the 5:10 p.m. CT start in the opener. It will be the seven-time All-Star's first trip back to Detroit since coming to Houston in a waiver-wire deal last September. Verlander has already faced his old mates once this season back in July with mixed results as he struck out 12, but also served up four solo home runs.
Craig Forde is a contributor to MLB.com based in Boston.