St. Louis has won two in a row against the Marlins after dropping nine of 10 overall.
Miami lost its third straight.
Goldschmidt, who had a tying RBI single in the sixth, led off the ninth and fell behind 1-2 in the count before he drilled a 98 mph fastball from Yimi Garcia (3-5) to right-center field for his sixth career walk-off home run. The previous one also came against the Marlins in June 2019 to give St. Louis a 2-1 victory in 11 innings.
“Honestly, I was trying to shorten up just to put something in play,” Goldschmidt said. “I told myself before I walked up there, just not try and do too much.”
St. Louis won back-to-back games for the first time since May 28-29 against Arizona.
Alex Reyes (4-2) worked a scoreless ninth for the win.
Goldschmidt tied the game with a two-out, two-strike hit in the sixth. Pinch-hitter Jose Rondon began the rally with a one-out single.
"I treat every game as though I'm starting,” Rondon said. “I treat every day like I'm in the lineup.”
St. Louis manager Mike Shildt felt Rondon's hit was the key to the tying rally.
“It's a 26-man roster for a reason, right?” Shildt said.
Miami starter Trevor Rogers allowed one run and three hits over six innings. He struck out six and walked one.
Rogers has held opponents to one run or none in eight of his 14 starts this season.
“Just giving them a good mix of all of my pitches,” Rogers said. “Changeup was on, fastball (moved) in and out.”
St. Louis starter Kwang Hyun Kim also gave up one run and three hits in six innings. He struck out six and walked five.
Kim was coming off a short stint on the 10-day injured list after he developed lower back stiffness while running the bases in his last start on June 4 against Cincinnati. It was his first quality start of the season.
“Later in the game, I was better than early in the game,” Kim said. “Something positive."
St. Louis outfielder Tyler O'Neill stretched his career-best on-base streak to 21 games with a second-inning walk.
Miami first baseman Jesus Aguilar has hit all 12 of his home runs on the road this season. He is the first player to do that since Jose Abreu hit his first 13 homers on the road for the Chicago White Sox in 2017.
Marlins: OF Corey Dickerson was placed on the 10-day injured list with a bruised left foot sustained while running the bases in a 6-4 loss to Atlanta on Sunday. Jesus Sanchez was recalled from Triple-A Jacksonville to replace Dickerson.
Cardinals: INF Tommy Edman was a late scratch due to right side tightness. He is day-to-day. "We don’t think it’s overly serious,” Shildt said.
St. Louis RHP Johan Oviedo (0-2, 5.72 ERA) faces RHP Sandy Alcantara (4-5, 3.39) in the finale of the three-game set Wednesday afternoon. Oviedo will be making his first appearance against the Marlins. He allowed four earned runs in 4 1/3 innings of an 8-5 loss to the Chicago Cubs at Wrigley Field on Friday. Alcantara has allowed two runs or fewer in four of his last five starts.
Patiño blanks Yanks as Rays pound Cole, bullpen in 14-0 rout
— Luis Patiño outpitched Gerrit Cole, Brett Phillips hit a grand slam during a 10-run sixth inning, and the Tampa Bay Rays avoided a three-game sweep by routing the New York Yankees 14-0 on Thursday.
Rays shut out Yankees behind massive 10-run sixth inning
Brett Phillips' first-career Grand Slam and home runs from Ji-Man Choi and Austin Meadows help the Rays seal the win vs. the Yankees.
Randy Arozarena's popup gets stuck in the roof
Randy Arozarena hits a popup that never comes down as it gets stuck in the roof at Tropicana Field.
Austin Meadows smokes three-run jack in the first inning
Austin Meadows cranks a three-run home run to right-center field to give the Rays an early 4-0 lead.
Max Scherzer focuses on positives in possible Washington Nationals finale
Max Scherzer delivered a signature performance Thursday in what might be his last start for the Nationals.
Riley homers again as Braves win series, inch closer to Mets
— Austin Riley concluded his big week at Citi Field by hitting a two-run homer and finishing with three RBI, and the Atlanta Braves inched closer to the NL East-leading New York Mets with a 6-3 victory on Thursday.