If not for Brandon Kintzler's work in the eighth, he wouldn't have had that chance.
Washington's winning streak over the Astros dates to 2012. The Nationals have won 13 of 14 against Houston since 2011.
The Astros threatened in the eighth against Kintzler when Josh Reddick and Yuli Gurriel hit consecutive singles and the Nationals intentionally walked Carlos Beltran with one out to load the bases. But Max Stassi grounded into a double play to leave Houston trailing.
"He certainly saved the game," manager Dusty Baker said. "They had bases loaded and one out and threw up a double-play ball, which is what everybody in the dugout was hollering. They were like: `Hey we need a double play.' If you strike him out, you're still not out of trouble."
Tanner Roark (10-8) allowed six hits and two earned runs in 5 2/3 innings and Doolittle pitched a perfect ninth for his 15th save.
Kendrick's triple tied it in the third before the Astros went back on top with an RBI single by Josh Reddick in the bottom half. Anthony Rendon doubled with two outs in the fourth before the homer by Wieters, which landed just to the right of straightaway center field, gave the NL East leaders a 4-3 lead.
"I was just trying to get a ball up," Wieters said. "(Charlie) Morton is good at getting groundballs, so I just wanted to try to get something that I could get underneath and stay through ... and I was able to do that on that one."
Morton (10-6) gave up four runs in six innings for the AL West-leading Astros.
George Springer led off the Houston first with a single, stole second and scored on a two-out single by Reddick.
The Astros went 3 for 11 with runners in scoring position.
"We are one big hit away it seems like," Reddick said. "We get a lot of guys on base. We just can't seem to pull through with that one guy to get us over the hump."
Beltran doubled off the wall in left-center field in the second and scored on a single by Derek Fisher.
Nationals: Baker said OF Bryce Harper (left knee bone bruise) isn't limping as bad as he has been, but that there is still no timetable for his return. ... RHP Max Scherzer (neck inflammation) is expected to come off the disabled list on Friday to start against the New York Mets.
Astros: SS Carlos Correa (left thumb surgery) took batting practice with the team on Tuesday for the first time since he was injured. Correa, who has been out since July 18, said he feels good and hopes to go on a rehabilitation assignment soon. ... Manager A.J. Hinch said that C Evan Gattis (concussion) to return to the lineup on Thursday.
Houston's relievers pitched three scoreless innings on Tuesday to extend the bullpen's streak of scoreless innings to 10 2/3 innings. It's the third straight game in which the bullpen hasn't allowed a run, which ties a season-long streak.
Kendrick is hitting .338 with 16 RBI since being traded from the Phillies on July 28. He has 10 extra-base hits in just 20 games with Washington, highlighted by five homers.
Nationals: Edwin Jackson (4-2, 3.43 ERA) is scheduled to start for the Nationals on Wednesday. Jackson allowed eight hits and one run in seven innings of a 2-1 win over San Diego in his last start.
Astros: Mike Fiers (7-8, 4.32) will start for Houston on Wednesday. Fiers yielded seven hits and three runs in 5 1/3 innings of his last outing against the Diamondbacks for his fourth loss in five games.
More AP baseball: https://apnews.com/tag/MLBbaseball
MLB's noncompetitive behavior issues are now out there for the world to see
It was always there -- tanking, manipulating service time -- but Kevin Mather and the Mariners put a spotlight on the whole thing. It's impossible to ignore now.
DJ LeMahieu thrilled to play in front of crowd, knows 'how much it means to a lot of fans to watch the Yankees'
On Sunday, DJ LeMahieu and the New York Yankees will have a chance to feel that "adrenaline and excitement" that last season lacked, when they play in front fans against the Toronto Blue Jays to Steinbrenner Field.
Albert Pujols reiterates he'll decide future after season with Los Angeles Angels
Following last week's misinterpreted Instagram post, Albert Pujols reiterated his stance that he hasn't decided whether to retire after this season
Revisiting Miguel Cabrera's 2020 homers
As Miguel Cabrera attempts to get to 500 career home runs, relive all the dingers he hit during the 2020 season.
Detroit Tigers slugger Miguel Cabrera hopes to reach 500 home runs, 3,000 hits in 2021 season
Tigers star Miguel Cabrera is 13 home runs shy of 500 for his career and 134 hits short of 3,000. He hopes to reach both milestones this season. "We can do both," he said.
Chicago Cubs' Joc Pederson, Javy Baez both have something to prove, but for different reasons
Chicago Cubs shortstop Javy Baez and left fielder Joc Pederson both have something to prove in 2021, but for different reasons.