Gonzalez allowed his only run in the fourth inning. Mark Ellis singled to right field, scoring Allen Craig to tie the score at 1.
"Gio threw the ball well against a really tough lineup," manager Matt Williams said. "He was aggressive in the strike zone, he threw a good fastball tonight. He threw his curveball occasionally to keep them off balance."
The score was tied at 1 when Washington took the lead against Michael Wacha in the seventh inning.
With runners on first and second and no outs, Danny Espinosa bunted the ball back to Wacha, who made a perfect throw to third baseman Matt Carpenter. But Carpenter dropped the ball to load the bases.
"We had an out. We had just met at the mound and Yadi, myself and Michael discussed how we're going to be real aggressive getting that out at third," Carpenter said. "We got the perfect bunt. Michael made a great play. I got back to the bag and pretty much what happened was I stretched before I saw where it was going and ended up missing it. It was a good throw, should have caught it, but it tipped off my glove and ended up being the difference in the game. It's just unfortunate. He pitched great and I hate that it ended up happening like that."
Two outs later, the bases were still loaded and Zach Walters was at the plate, when Wacha threw a changeup that got away from Molina, who tried to throw out Ian Desmond trying to score. But Molina threw the ball into the Cardinals' dugout, allowing both Desmond and Espinosa to score.
"You never see a ball get away from Yadi, ever," Williams said. "Heads up baserunning and aggressive baserunning and, over all, they played it really well. ... The ball was far enough and Desi made the decision to get toward the plate and we picked up the other one on the bad throw."
Wacha took responsibility for the wild pitch.
"I short-hopped one to Yadi that got away from him, and they end up scoring two runs on it. I have to make a better pitch in that situation and try and get out of it," Wacha said. "It was 0-1 and you want to make your pitch for sure. I spiked a changeup down in the dirt and it ended up getting away from Yadi. I've got to make a better pitch in that situation."
However, the Cardinals didn't take it easy on reliever Tyler Clippard an inning later. With runners on first and second and no outs, Jhonny Peralta battled Clippard and hit a liner to the right-hander. The ball hit Clippard's glove and bounced to the ground, but he threw out Peralta at first to put runners on second and third.
Williams then decided to take Clippard out of the game in favor of right-hander Drew Storen, who had better success against Matt Holliday. Against Storen, Holliday was 0-for-5 as opposed to being 1-for-2 with two walks against Clippard.
"If we want Clippard available for tomorrow, he is going to run into 30-plus pitches. It's also not a favorable matchup," Williams said. "It's a better matchup off Drew. I want to potentially have Clippard tomorrow, too."
Storen forced Holliday to pop out to first baseman Adam LaRoche and Craig to ground out to Desmond at shortstop to end the threat.
"Drew was aggressive. He threw his fastball when he wanted to. It's important for him. He was good," Williams said.
With the win, the Nationals improved their record to 10-7 and snapped an eight-game losing streak to St. Louis that dates back to Game 5 of the 2012 National League Division Series.
Is it a big deal for the Nationals, who have two more games this weekend against the Cardinals?
"I don't pay attention to those things, but they are a tough team to beat," Williams said. "It's the reason they have been in the playoffs. They have been so good because they do things right. We happen to take advantage of one tonight."
Said Gonzalez, "The Cardinals are a tough lineup, tough team altogether. We needed something like this. Now we go from here -- one game at a time."