The Dodgers came into the ninth trailing 4-3 and were looking at the possibility of falling 5 1/2 games behind National League West-leading San Francisco, which had beaten the Chicago Cubs earlier Sunday.
Gonzalez then came up and laced an 0-2 pitch down the right field line and into the corner, sending both runners home to salvage a victory for the Dodgers.
Ronald Belisario (4-1) earned the win with a scoreless top of the ninth for Los Angeles, which split a four-game series with the D-backs.
Boston schools pull out free condoms over wrapping complaints
NBC reportedly holds celebs hostage to Jimmy Fallon's show