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 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. Alex Reyes worked a scoreless ninth for the win.