Adam LaRoche, Rusty Ryal and John Hester also drove in runs for the Diamondbacks, who have won three straight and five of seven overall.
Aaron Heilman (3-3) gave up solo home runs to Jerry Hairston Jr. and Adrian Gonzalez in the top of the ninth but still got the win for Arizona. Diamondbacks starter Rodrigo Lopez went five-plus innings, allowing three runs on eight hits.
Gonzalez finished 3-for-4 for the Padres. Ryan Ludwick, Chase Headley and Nick Hundley also drove in a run apiece for San Diego.
Padres starter Clayton Richard gave up five runs on five hits over a season-low 3 2/3 innings.