The Diamondbacks forged a 4-4 tie in the top of the fifth inning thanks to a throwing error by Pirates third baseman Pedro Alvarez on a Paul Goldschmidt grounder.
But the Bucs came right back in the next half inning when they loaded the bases with none out against Arizona starter Ian Kennedy (10-9) and Walker followed by splitting the left-center field gap with a two-run double, putting Pittsburgh ahead to stay.
The Bucs second baseman also cracked a three-run homer in the first inning as the second-place Pirates moved to within 2 1/2 games of National League Central-leading Cincinnati.
Kevin Correia (9-6) collected the win after holding the D-backs to four runs (three earned) on six hits through six full frames.
Joel Hanrahan struck out the side in the ninth to notch his 33rd save.
Kennedy finished by allowing six runs (five earned) on eight hits over four full innings.
Willie Bloomquist went 3-for-5 with two RBI for Arizona.
Notable deaths of 2014 [PHOTOS]