With the score tied 2-2 in the eighth, the Marlins loaded the bases with two out against Andrew Cashner (2-2) and the Padres reliever then issued a walk to Stanton for the go-ahead score.
The Marlins went on to score three more runs on a pair of passed balls by Padres catcher John Baker and a Gaby Sanchez single, completing a three-game sweep of San Diego and logging their sixth straight victory.
The rally made a winner of Ricky Nolasco (4-0), who held the Padres to two runs on five hits over seven frames. He walked one and fanned three.
Padres starter Joe Wieland allowed two runs over 5 2/3 innings and stroked a two-run double.
Notable deaths of 2014 [PHOTOS]
LeBron James reveals his new Nike shoes