Ryan Zimmerman crossed home plate with the 3 game series.
Zimmerman worked a one-out walk against Lucas Harrell (0-1) and Michael Morse followed with a walk to put the winning run at second. Wilton Lopez entered the game to face Jayson Werth, who slapped a grounder to Paredes. Paredes rushed his throw to second, fired it wide and the ball rolled into right field, allowing Zimmerman to score.
"I was just hoping for a bad hop," Nationals manager Davey Johnson said of Werth's grounder. "But when he threw it away, we'll take it."
Zimmerman added a two-run homer and Chris Marrero chipped in with an RBI double for the Nationals, who snapped a two-game skid and won in walkoff fashion for the 12th time this season.
Tyler Clippard (3-0) tossed two innings in relief to earn the win.
Trailing 3-2, Washington plated the tying run in the seventh thanks to a throwing error by Astros starter Bud Norris. With one out, Norris walked Danny Espinosa and then hit him in the back with a pickoff throw, which allowed the second baseman to make it all the way to third. Marrero then drove Espinosa home with a double to left.
"That got away a little bit," Norris said of his errant throw.
Houston got the go-ahead run to third base in the eighth when Bourgeois singled to begin the frame, stole second and moved to third on a groundout by Carlos Lee. He was stranded there however, as Henry Rodriguez fanned J.D. Martinez and got Chris Johnson to line out to center to end the inning.
Washington jumped out in front in its first at-bat when Rick Ankiel worked a one-out walk and Zimmerman followed by crushing a fastball from Norris over the wall in left-center to give the Nats the early lead.
The Astros pulled a run back in the third inning. Barmes led off the frame with a ground-rule double and moved to third on a groundout by Humberto Quintero. Norris then helped his own cause by lofting a sacrifice fly to center, allowing Barmes to trot home and make it a 2-1 game.
In the fourth, Jose Altuve ripped a singled to begin the frame and Bourgeois singled to put two runners on. Following a Carlos Lee pop out, Martinez was plunked by Nats starter Tom Milone to load the bases with one down. Johnson then lifted a sacrifice fly to center to score Altuve and tie the game.
The Astros grabbed the lead in the sixth when Lee ripped a double into the left field corner and came home three batters later on Barmes' sharp single over the head of Steve Lombardozzi at shortstop and into left-center field to make it 3-2.
The Nationals are 22-24 against the Astros since moving to Washington D.C. prior to the 2005 season...Lee is one RBI shy of 80, which would give him 13 consecutive seasons with at least 80 RBIs...Prior to Friday's game, the Astros claimed pitcher Lance Pendleton off waivers from the New York Yankees and signed undrafted free agent pitcher Alan Abreu...Lee has hit safely in 17 of his last 18 games...Norris went seven innings, giving up three runs -- two earned -- on five hits, while Milone gave up three runs on eight hits over 5 2/3 innings.