The Diamondbacks won the opener of a four-game series and ended a three-game losing streak.
Arizona overcame an early three-run deficit to tie the game in the sixth and then broke through with the deciding runs in the eighth against Jim Henderson (3-3).
Adam Eaton drew a four-pitch walk to open the eighth and was sacrificed to second by Geraldo Parra. Paul Goldschmidt was walked intentionally and one out later Jason Kubel walked as well to load the bases.
Prado followed with his single to center that delivered two runs.
The late runs gave the victory to starter Wade Miley (6-7), who went eight innings while giving up three runs on eight hits without a walk and four strikeouts.
Brad Ziegler put two on in the ninth, but escaped the jam to collect his second save. He had earned his first save in two years last week in a 15-inning victory over the New York Mets.