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
RHP Doug Fister retiring at 35, eyes 'new chapter'
Veteran pitcher Doug Fister, who recorded a 3.72 ERA over 10 major league seasons, "wants to start a new chapter in his life," his agent told MLB.com Wednesday.
Phillies' Jake Arrieta recovering after recent knee surgery
Phillies manager Gabe Kapler said Wednesday that starter Jake Arrieta recently underwent surgery after injuring his left knee while weight training. Arrieta should be ready for the start of the regular season, or shortly thereafter, Kapler said.
Yu Darvish admits to feeling pressure with Cubs last year
Cubs pitcher Yu Darvish said he felt pressure to deliver after signing a big contract last season, but this year he just wants to be himself.
Yankees' Aaron Boone expecting big things from Gary Sanchez
It was a challenging 2018 season for Yankees catcher Gary Sanchez, but manager Aaron Boone met with him over the offseason in the Dominican Republic and came away saying he believes Sanchez is ready to move forward and take charge this year.
Angels' Shonei Ohtani has no regrets hitting through year, delaying surgery
AL Rookie of the Year Shohei Ohtani, who is recovering from Tommy John surgery, hopes he'll be able to bat in the Angels' lineup as early as May if all stays on schedule.
Chris Sale sees room for improvement for Red Sox in '19: For him not to miss time due to injury
Red Sox pitcher Chris Sale wants to make 30-plus starts and pitch 200-plus innings, like he'd done in four of his previous five seasons.