Hundley's sixth-inning blast with Chase Headley and Tommy Medica aboard snapped a 1-1 tie.
Stults (10-13) held the Diamondbacks to one run on seven hits over 6 1/3 innings, walking two and striking out three.
Huston Street secured the victory with his 33rd save in the first of a four-game series.
Brandon McCarthy (5-10) was reached for four runs on eight hits over six innings for Arizona.
Adam Eaton provided the D-backs' only RBI.
Notable deaths of 2014 [PHOTOS]