The right-hander (4-1) struck out nine while allowing three runs, two earned, in 7 1-3 innings.
Andre Ethier added his 11th home run and had two RBIs for the Dodgers, who won their season-high fourth straight.
Jonathan Broxton allowed the tying run to get to the plate in the ninth before getting his fourth save in six attempts.
Adam LaRoche drove in all three runs for Arizona, which lost all six games of a homestand.
Edwin Jackson (1-5) gave up six runs on seven hits in 6 2-3 innings.
Kuroda, who returned three weeks after he was hurt, gave up a leadoff single to Conor Jackson before departing in the eighth with a 6-2 lead. Justin Upton and Mark Reynols later drew back-to-back walks to load the bases with one out, but Arizona managed only one run, on a sacrifice fly by LaRoche.
Tony Abreu greeted Broxton with a single and Cole Gillespie walked with one out, but the Dodgers closer fanned the next two batters to end the game.
The series sweep was the first of the year for Los Angeles, which improved to 7-11 on the road.
Arizona now heads to Atlanta and Florida to try and break out of its slump.
Trailing by one with two outs in the seventh, the Diamondbacks intentionally walked Ethier to load the bases for Ramirez. He responded by lining a three-run double off the wall in center for a 6-2 lead.
Matt Kemp's single drove in Jamey Carroll in the fifth to put Los Angeles up 3-2.
Ethier started the scoring with a two-run homer in the fourth before LaRoche tied it with a two-run double in the bottom of the inning.