Hanson (6-4) gave up homers to the first two batters he faced, with Steve Lombardozzi and Bryce Harper connecting on consecutive pitches. They became the first pair of rookies in modern baseball history to homer in succession leading off a game, the Nationals said in citing the Elias Sports Bureau.
Hanson then blanked the Nationals over the next six innings. The right-hander allowed two runs, six hits and no walks in seven innings.
Eric O'Flaherty worked the eighth and Craig Kimbrel struck out the side in the ninth for his 16th save in 17 tries.
Gonzalez (7-2) was seeking to win his sixth straight start.
METS 6, CARDINALS 1
NEW YORK (AP) — Jonathon Niese struck out a career-high 10 in six scoreless innings and the Mets shut down the slumping Cardinals for the third straight game, getting a homer and three RBIs from rookie Kirk Nieuwenhuis.
Andres Torres added a two-run triple and finished a homer shy of the cycle. Nieuwenhuis, batting leadoff, also had three hits.
Niese (4-2) became the latest New York pitcher to dominate the Cardinals, following Johan Santana's no-hitter in the series opener Friday night — the first in Mets history — and knuckleballer R.A. Dickey's seven-hit shutout Saturday.
The only thing that prevented the Cardinals from being blanked in three consecutive games for the first time since October 1976 was a two-out RBI single by Adron Chambers in the eighth off Elvin Ramirez, who was making his major league debut.
GIANTS 2, CUBS 0
SAN FRANCISCO (AP) — Barry Zito pitched 8 1-3 scoreless innings for his 150th career win and Joaquin Arias snapped an 18 at-bat hitless stretch with an RBI single that led the San Francisco Giants over the Chicago Cubs.
Zito (5-2) was rarely threatened by the struggling Cubs, allowing just four hits and two walks before leaving to a standing ovation after a one-walk to Darwin Barney in the ninth. Sergio Romo finished for his second save.
Travis Wood (0-2) was the tough-luck loser for the Cubs, allowing just one run and three hits in seven innings as Chicago fell for the 15th time in 18 games. The Cubs have also lost 10 straight road games for their longest skid away from Wrigley Field since dropping 10 in a row in September 2000.
MARLINS 5, PHILLIES 1
PHILADELPHIA (AP) — Carlos Zambrano homered and pitched into the eighth inning, and Hanley Ramirez went deep, too, to lead the Miami Marlins over Philadelphia.
Zambrano (4-3) allowed four hits, walked two and struck out seven in before leaving with two outs in the eighth to win for the seventh time in nine games.
Zambrano leads all pitchers since 1974 with 24 career home runs. He connected against Joe Blanton (4-6).
Heath Bell came on with two on and one out in the ninth and got a pair of groundouts for his 12th save in 16 chances.
Jose Reyes went 2 for 5 with a double and two RBIs to extend his hitting streak to 14 games.
DIAMONDBACKS 6, PADRES 0
SAN DIEGO (AP) — Trevor Cahill threw a six-hitter and Paul Goldschmidt, Miguel Montero and Gerardo Parra homered to lead the Arizona Diamondbacks past San Diego.
Cahill (3-5) threw his second career shutout and complete game. His other came with Oakland on Aug. 2, 2010 in a 6-0 win against Kansas City when he threw a three-hitter.
Cahill, born and raised in Vista about 40 miles north of San Diego, won for the first time in six starts, striking out five and walking three.
Eric Stults (1-2) took the loss.
ASTROS 5, REDS 3
HOUSTON (AP) — Jordan Lyles pitched seven strong innings, Justin Maxwell hit his third pinch-hit home run this season and the Houston Astros ended a season-worst eight-game losing streak by beating Cincinnati.
Lyles (1-1) allowed five hits and struck out three in his first win since last Aug. 20.
He has made five starts for Houston, but spent most of the season in Triple-A. Brett Myers pitched a 1-2-3 ninth for his 13th save.
Bronson Arroyo (2-4) yielded a season-high five earned runs in 6 1-3 innings and remained winless since May 7.
ROCKIES 3, DODGERS 2
DENVER (AP) — Alex White gave the overworked Colorado bullpen some much-needed rest, pitching shutout ball into the seventh inning as the Rockies beat the Los Angeles Dodgers.
The Rockies took two of three from the NL West leaders.
White (2-3) gave up two runs and two hits in 6 2-3 innings. Rafael Betancourt pitched a perfect ninth for his 10th save.
Colorado starters had combined for a total of five innings in the first two games of the series. Josh Outman reached a pitch limit after 3 1-3 innings in his first start this season, then a knee injury forced Juan Nicasio out after 1 2-3 innings.
Nathan Eovaldi (0-2) lost in his second start since being recalled to replace injured Ted Lilly in the Dodgers' rotation.
PIRATES 6, BREWERS 5
MILWAUKEE (AP) — Andrew McCutchen and Garrett Jones hit consecutive homers and James McDonald struck out eight and won for the third time in four starts when the Pittsburgh Pirates beat Milwaukee.
McDonald (5-2) held the Brewers to four hits and a walk, and only one of the three runs he allowed was earned.
Joel Hanrahan pitched a shaky ninth for his 14th save of the season. Brooks Conrad led off with a solo home run, and pinch-hitter George Kottaras walked before Norichika Aoki hit into a game-ending double play.
Michael Fiers (1-1) gave up four runs and eight hits with eight strikeouts and a walk in five innings in his second big league start.