The Diamondbacks had tied the score 4-4 in the seventh, leading to the extra innings.
Cody Ross started the Diamondbacks' outburst with a leadoff double off Ronald Belisario (3-5) and the next four Arizona batters reached base, with Martin Prado driving in Ross and Cliff Pennington, the first batter to face reliever Brandon League, singling to score Miguel Montero.
League got two outs but Parra delivered a base hit that allowed Didi Gregorius and Pennington to score.
The Dodgers' Ramon Hernandez led off the bottom of the 12th with a home run and Yasiel Puig singled and Skip Schumaker walked. Both advanced on an out and Puig scored on a Mark Ellis grounder to make the score 8-6.
Health Bell enticed a grounder from Tim Federowicz for the final out to allow Josh Collmenter (3-0), who pitched two innings of one-hit relief to get the win.
Prado and Gregorius had consecutive RBI singles and a run scored on a double play to give Arizona a 3-0 lead in the fourth. The Dodgers sent nine batters to the plate in a four-run fifth inning, with all of the runs scoring with two out.
A two-out single by Paul Goldschmidt was followed by hits from Ross and Montero, who each had four hits, and tied the score in the seventh.