Goldschmidt hit two of Arizona's five homers, and the Diamondbacks avoided a sweep by pounding the Cincinnati Reds 9-2 on Sunday.
Daniel Descalso, Eduardo Escobar and David Peralta also connected for Arizona, and Zack Godley pitched 6 2/3 innings of two-run ball. Goldschmidt finished with three hits and three RBI, and Descalso also drove in three runs.
"You don't want to get swept," said Descalso, who hit his first homer since June 27. "You want to win every series, but you don't want to leave here 0-3. I don't know if it was a must-win, but there was a little sense of urgency."
Godley (13-6) snapped a tie with Zack Greinke for the team lead in wins. The right-hander allowed six hits, struck out six and walked one while improving to 5-0 with a 3.09 ERA over his last six road starts.
"Zack did a great job of setting the tone, and we played our type of game," Arizona manager Torey Lovullo said. "The right guys stepped up."
The Diamondbacks were tied with the Dodgers for the NL West lead coming into the day.
Last-place Cincinnati had won three of four, including the first two games of the weekend series. Jose Peraza and Eugenio Suarez each had two hits, but Luis Castillo (6-10) was tagged for five runs and five hits in 5 2/3 innings.
Homers accounted for each of Arizona's runs. Descalso hit a three-run shot in the first on a two-strike pitch, and Goldschmidt made it 5-2 with a two-run drive in the sixth.
"I was supposed to throw inside on the 0-2 pitch, but it was over the plate and he took advantage of it," Castillo said. "The pitch to Goldschmidt, I got it where I wanted, but he's a big strong man and put a good swing on it. I thought it was a fly ball, but it kept going and going. I thought overall, I pitched well. The only mistake I made was to Descalso."
The Diamondbacks scored four more runs off Keury Mella in the ninth. Escobar hit a two-run shot, and Goldschmidt and Peralta added back-to-back homers.
Joey Votto drove in Peraza with a sacrifice fly in the third. Cincinnati scored its first run when Arizona shortstop Nick Ahmed committed a throwing error on a potential double-play ball in the second, allowing Suarez to score from second.
IN THE PARK
Godley has not allowed a home run to any of the last 211 batters he has faced over nine games, including eight starts, since Starlin Castro went deep on June 26 at Miami.
KNOWS HIS STUFF
Descalso also doubled in the sixth to improve to 4 for 10 with two homers and six RBI in his career against Castillo.
Diamondbacks: Greinke (12-7) starts Monday night at Texas against Bartolo Colon (6-10). Greinke has allowed a combined three runs over 13 innings in his last two starts and lost both.
More AP baseball: https://apnews.com/tag/MLBbaseball and https://twitter.com/AP-Sports
The Dodgers beat the division-rival Rockies for the second straight night Tuesday, pushing their National League West lead to 1 1/2 games and prompting manager Dave Roberts to say "things are coming together at the right time."
The Cubs might have an unorthodox solution to their closer quandary after losing two key relievers: score early, score often and skip saves.
The Los Angeles Angels will look to further endanger the Oakland Athletics' chances of making the playoffs when the teams meet Wednesday night for the second time in a three-game series.
The Chicago Cubs' uninterrupted 30-day march through the stretch drive will finally end with a day away from the park Thursday.
Kaleb Cowart hit a go-ahead grand slam in a six-run sixth inning before adding an RBI triple, and the Los Angeles Angels rallied past the Oakland Athletics 9-7 on Tuesday night.
As the Milwaukee Brewers try to close in on a postseason berth, offense has suddenly become hard to come by.