The Los Angeles bullpen had held the Diamondbacks to three hits and no runs over five innings after the Dodgers tied the score 3-3 in the sixth.
But Matt Guerrier (0-2), making his first appearance since April 18, had his third pitch lined over the right-field wall by Kubel for Kubel's 27th home run of the year.
Brad Bergesen (1-0), the sixth Arizona pitcher Friday, pitched the ninth and 10th innings, not giving up a hit, and collected the win.
Chris Johnson followed a Miguel Montero single with a triple in giving the Diamondbacks a 1-0 lead in the second. Johnson led off the fifth with a double and scored on Trevor Cahill's base hit. Cahill made the score 3-0 by reaching home on Aaron Hill's double.