Upton drove in five runs hitting behind Jason Heyward, who had two hits with a RBI in his first game back after having his appendix removed April 22.
It was the first time this season the Braves had Heyward in the lineup along with catcher Brian McCann, who missed the first 30 games while recovering from off-season shoulder surgery.
Scott Van Slyke hit two homers for the Dodgers, who led 4-2 before Upton's third career grand slam. Los Angeles had won four of its previous five coming in — its best stretch since early April.
Paul Maholm (5-4) allowed eight hits and four runs — two earned — in six innings, and Craig Kimbrel pitched the ninth for his 12th save.
Hyun-Jin Ryu overcame a career-high five walks to give up only two runs in five innings, but Dodgers relievers Matt Guerrier and Poco Rodriguez (0-2) quickly blew the 4-2 lead in the sixth.
CARDINALS 7, BREWERS 6
ST. LOUIS (AP) — David Freese hit a grand slam for his first homer of the season during a five-run first inning for St. Louis, and the Cardinals held on to beat Milwaukee.
The Brewers made it close on a pair of three-run homers by Aramis Ramirez off Jaime Garcia before losing for the 13th time in 15 games. The bottom four spots in the lineup were a combined 0 for 15.
The Cardinals had five hits and a walk while batting around against Wily Peralta (3-4) in the first, but the right-hander was still in the game when Garcia (5-2) was chased in the sixth.
Milwaukee got one hit in 3 2-3 innings against three relievers, with Edward Mujica working the ninth for his 12th save in 12 chances.
ROCKIES 10, GIANTS 9
DENVER (AP) — Jordan Pacheco hit a tiebreaking grand slam in the fifth inning and Carlos Gonzalez added a solo homer, helping Colorado hold on for a win over San Francisco that snapped a 10-game skid against the Giants.
Pacheco laced his first homer of the season to left on a hanging slider from Madison Bumgarner (4-2), who failed to protect an early four-run lead.
Jorge De La Rosa (5-3) entered the game without giving up a run at Coors Field in 12 innings. He was hit hard, surrendering five runs in five innings, only to settle down enough to earn the win.
In the ninth, Rafael Betancourt struck out the side for his 10th save in as many chances.
PHILLIES 5, REDS 3
PHILADELPHIA (AP) — Domonic Brown drove in the tiebreaking run on an infield grounder in the eighth and Philadelphia snapped Cincinnati's six-game winning streak.
Jimmy Rollins hit a two-run homer and Cliff Lee threw seven sharp innings for the Phillies, who won for the fourth time in five games.
Lee gave up two runs and six hits, striking out seven. Justin De Fratus (2-0) got two batters out in the eighth and Jonathan Papelbon finished for his eighth save in eight tries.
Joey Votto hit a solo homer, Jay Bruce added a two-run shot and Tony Cingrani allowed three runs and five hits in five innings for the Reds. Sean Marshall (0-1) took the loss.
DIAMONDBACKS 9, MARLINS 2
MIAMI (AP) — Paul Goldschmidt homered twice, tied his career high with four hits and drove in four runs to lead Arizona over Miami.
Eric Chavez homered and also had four hits, and Gerardo Parra and Martin Prado had three hits apiece for Arizona, which had 16 hits in all and won its third straight game.
Trevor Cahill (3-4) won for the third time in four decisions following an 0-3 start, allowing one run, five hits and four walks in eight innings. He walked his first two batters in the third before retiring 13 in a row, 10 on groundballs.
Kevin Slowey (1-4) gave up six runs and seven hits in three innings for the Marlins.
METS 3, CUBS 2
CHICAGO (AP) — Matt Harvey won his fifth straight decision, allowing five hits in 7 1-3 innings and singling in the go-ahead run in the seventh to lead New York over Chicago.
Daniel Murphy and David Wright homered for the Mets, and right fielder Marlon Byrd preserved the lead by throwing out a runner at the plate in the eighth inning. The Mets won consecutive games for the first time since May 1 and 3.
Harvey (5-0) won his first four starts, then failed to get a decision in his next four.
Edwin Jackson (1-6), coming off a victory at Washington on May 11, gave up three runs and seven hits in 6 2-3 innings for the Cubs.
NATIONALS 6, PADRES 5, 10 INNINGS
SAN DIEGO — Adam LaRoche hit two towering home runs and Chad Tracy's solo shot in the 10th inning lifted Washington over San Diego.
Tracy's seventh career pinch-hit home run negated a blown save from closer Rafael Soriano, who gave up two runs with two outs in the ninth.
The Padres tied the game with three straight singles. Chase Headley's RBI made it 5-4 and Yonder Alonso pushed him to third with another single. Kyle Blanks evened the score with another single, which sent the game into extra innings.
It was Soriano's second blown save in 14 chances. Drew Storen got his first save of the season in the 10th.
Tracy's home run came off Padres closer Huston Street (0-3), who has allowed six home runs in 17 1-3 innings. He gave up two in 39 innings last season.
PIRATES 5, ASTROS 4
PITTSBURGH (AP) — Jimmy Paredes dropped Russell Martin's bases-loaded fly ball when he collided with second baseman Jake Elmore with two outs in the ninth, the second missed catch by a Houston right fielder, and Pittsburgh rallied past the Astros.
Down 4-1, Pittsburgh started its comeback in the sixth when Chris Carter dropped Andrew McCutchen's fly ball for a three-base error and Garrett Jones followed with a double.
Pedro Alvarez hit a two-run homer in the eighth and Justin Wilson (4-0) worked the tenth inning to pick up the win for the Pirates.
Edgar Gonzalez (0-1) took the loss.