Stephen Strasburg made his second start of the season and went three innings, charged with one run on three hits with four strikeouts for the Nationals, who had lost three of four coming in. Tom Gorzelanny (3-6) earned the win for pitching three scoreless innings.
"We had a 70-pitch limit on him, no matter how good he looked," said Washington manager Davey Johnson about Strasburg. "We want him to get some time here and be ready to go next season."
Carlos Lee drove in a run for the Astros, who have dropped seven of nine and are just three losses away from 100 on the season. Henry Sosa (2-4) was tagged for five runs on seven hits in just 2 2/3 innings to take the loss.
"His pitches were flat and he didn't have his location," said Houston manager Brad Mills about Sosa. "And when you combine those two you're going to give up runs and he did."
Lee gave the Astros the early lead as he singled home Jimmy Paredes, who had singled and stolen second, in the first inning.
Washington, though, tied the game in the second on a sac fly from Chris Marrero.
The third saw Desmond lead off with his eighth homer. Ankiel followed with a shot over the left-center field wall and Zimmerman capped the long-ball parade with his 12th of the year.
Later in the frame, Marrero doubled home Danny Espinosa, who had earlier doubled, for a 5-1 lead.
Zimmerman added an RBI single in the sixth, while Laynce Nix and Desmond contributed RBI singles in the seventh for an 8-1 lead.
Matt Downs scored on a bad throw from Zimmerman off a J.R. Towles grounder in the ninth to account for the final margin.
The Nationals next travel to New York for a four-game series against the Mets...Houston returns home to face the Phillies for a three-game series starting on Monday...Each team won three games in the season series...It was the first time Washington hit three straight home runs since July 11, 2009 at Houston.