MILWAUKEE -- In his second start since a month-long stint on the disabled list, Gio Gonzalez found his groove Monday night.

The Washington Nationals left-hander hadn't earned a victory since April 18 -- and he allowed 16 runs over 12 1/3 innings in his last three starts -- but snapped out of that funk with six shutout innings of work in a 3-0 victory over the Brewers at Miller Park.

"It's a huge accomplishment coming back, especially with a team like that," Gonzalez said. "The Brewers are red-hot. I wanted to make a statement with the rotation and try to be a part of it."

Gonzalez (4-5) scattered three hits and four walks while striking out five for his seventh quality start of the season.

He faced just one real threat all night, loading the bases with two outs in the bottom of the third to bring up Milwaukee center fielder Carlos Gomez, who came into the game with an 18-game hitting streak but lined out to left, ending the inning.

"It gave the team some more life," Gonzalez said. "We got that inning over with, now move forward."

Along with the hitting streak, Gomez had reached safely in 35 consecutive games but finished the day 0-for-4 with a strikeout.

"He was different the last couple years that we faced him," Gomez said. "He was working with change-ups. We didn't expect him to be working with change-ups. It was a really good pitch for him."

The Brewers came into the game with 51 runs in their previous seven games and had won four in a row.

"We chased some balls out of the zone today but I thought Gio threw a really good game," Brewers manager Ron Roenicke said. "He spotted his fastball well. He always has a good curveball and he had a great change-up today. All his change-ups were down and that made a big difference today."

First baseman Adam LaRoche made sure Gonzalez's effort didn't go to waste, slugging his ninth home run of the season -- a three-run shot to center off Brewers right-hander Matt Garza.

"He just left a slider out over the plate," LaRoche said. "In that spot, you're really just trying to hit something hard and hit something in the air. It just happened to go out of the park. It was one of the few mistakes he made."

Garza went seven innings and struck out seven but was a little sluggish out of the gate before settling in.

An inning before LaRoche's home run, Garza loaded the bases with nobody out but struck out second baseman Danny Espinosa and catcher Jose Lobaton before getting Gonzalez to bounce into a force at second to get out of the inning.

Center fielder Denard Span opened the third with a fly ball to right but Garza walked third baseman Anthony Rendon then gave up a single to right fielder Jayson Werth to bring up LaRoche.

LaRoche worked the count full before connecting on a hanging slider to make it 3-0 Washington.

"It was a slider, oh well," Garza said. "I wish I could take it back, but it was the right pitch at the time. I just didn't execute it."

He worked quickly after that, retiring 14 of 15 batters and striking out four before giving way to right-hander Mike Fiers in the eighth.

"He threw the ball well the first few innings but that third inning got him," Roenicke said. "After that, I thought he threw a really good ballgame. I thought it made a difference when he started throwing his curveball for strikes and some good sliders in the dirt.

"Good outing, one bad pitch."

Both teams came into play Monday leading their respective divisions.

The victory gave Washington (40-35) a two-game lead over idle Atlanta in the NL East while the Brewers' lead dipped to 4 1/2 games over the Cardinals, who beat the Rockies, 8-0 in Denver.

NOTES: Nationals manager Matt Williams was ejected after the second inning for arguing balls and strikes with home plate umpire Mark Wegner. ... Washington OF Bryce Harper began a rehab assignment Monday with Class A Potomac, and he singled and walked in his two plate appearances. He left after three innings, as scheduled. Harper, out since April 26 with a sprained thumb, will play all three outfield positions during his seven-game assignment, which could put him back in the Washington lineup next week. ... Brewers RF Ryan Braun was in the starting lineup despite tweaking his ankle and leaving the game after eight innings Sunday at Colorado. ... Marc Lasry, one of two New York-based hedge fund billionaires who recently purchased the NBA's Milwaukee Bucks, threw out the ceremonial first pitch.