PITTSBURGH -- Adam Eaton had a moment to remember in what has been a lost rookie season.
Eaton's two-run double in the top of the 16th inning, his fourth hit of the game, gave the Arizona Diamondbacks a 4-2 victory over the Pittsburgh Pirates on Sunday at PNC Park.
The outfielder came into the game hitting just .216 after missing the first three months of the season because of a sprained elbow.
"For my mental state, this was really big," Eaton said. "I love the guys in this clubhouse, and when I don't produce, I feel like I'm letting them all down. When you come through, especially in a game-winning situation, there's not greater feeling than knowing you've helped your team."
Arizona (64-58) won for the fifth time in its past six games and remained five games behind the Cincinnati Reds in the race for the second National League wild card. The Diamondbacks and Reds open a four-game series Monday night at Cincinnati.
"It should be exciting, but every game is a big game and every series is a big series," Eaton said. "We're going to keep the same approach we have all year, and that's to grind each game out. It's been successful, so there is no reason to change."
That is how Arizona won Sunday as it improved to 13-5 in extra-inning games.
"Our guys are always upbeat," Diamondbacks manager Kirk Gibson said. "It can get frustrating when you get into extra innings and don't come through, but all you can do is keep going out there for another inning and battle. Our guys do that."
Eaton's hit ruined an otherwise outstanding outing by Pirates left-hander Kris Johnson, who was making his major league debut after spending eight seasons in the minor leagues. The 28-year-old had his contract purchased from Triple-A Indianapolis before the game to help a weary bullpen that was used for 16 1/3 innings the previous three days.
Johnson (0-1) entered the game to start the 11th and pitched five scoreless innings before A.J. Pollock walked to lead off the 16th and Didi Gregorius singled. Johnson came back to strike out pinch hitter Jason Kubel, and the runners moved up to second and third on Wil Nieves' groundout.
Eaton then hit a sinking line drive to center field that a sliding Andrew McCutchen nearly caught. However, the ball caromed off the Gold Glove center fielder and back toward the infield as Pollock and Gregorius scored.
"He threw a slider, and I tried to stay through it, and good things happen when you put the ball in play," Eaton said.
Johnson allowed five hits in six innings and struck out five. However, he could not prevent the Pirates (72-51) from suffering their seventh loss in nine games.
Pittsburgh had its lead in the NL Central cut to one game over the St. Louis Cardinals and 2 1/2 games over the Reds.
"It was a little nerve-racking at first," Johnson said. "I know we're in a pennant race, and coming into a tie ballgame with the bullpen being taxed recently, I just tried to go as deep as I could. Try to save the bullpen -- that was the main thing -- and try to keep the team in the ballgame and hopefully we could score some runs at the end.
"It's satisfying, I just wish I could have done a little more, maybe make a little better pitch at the end of the last inning."
Both starters had fine outings. Arizona left-hander Wade Miley gave up two runs and seven hits in eight innings with two walks and eight strikeouts. Pittsburgh right-hander Charlie Morton allowed two runs and seven hits in six innings with three walks and six strikeouts.
Aaron Hill also had four hits for Arizona to extend his hitting streak to 11 games. Gregorius had two hits.
Jordy Mercer had three hits for Pittsburgh, and Starling Marte added two.
Brad Ziegler (7-1) pitched two perfect innings for the win, and J.J. Putz picked up his sixth save in 11 chances.
With the Pirates out of position players, Johnson struck out swinging on a 2-2 pitch for the game's final out. Arizona intentionally walked Neal Walker with two outs and a runner on second base to face Johnson.
Putz said he has only faced a pitcher two other times in his 11-year career.
"It's just weird," Putz said. "It's the pitcher, and you're just trying to throw the ball down the middle and let him hit it, and I didn't do a very good job. Starters are used to it, but it's just different for a reliever. The other two times I faced a pitcher, I went 3-0 on them."
Pirates manager Clint Hurdle gave no thought to using his best-hitting pitcher, Gerrit Cole, to pinch-hit for Johnson.
"What would we do if Cole got hit on the wrist with a ball?" Hurdle said.
Arizona tied the score 2-2 with a two-run sixth inning. Hill hit an RBI single, and the tying run came home when Gerardo Parra grounded into a double play.
Pittsburgh took a 2-0 lead on RBI doubles by Russell Martin in the first inning and Mercer in the third.
NOTES: Pittsburgh optioned OF Andrew Lambo to Indianapolis, and C Michael McKenry was transferred to the 60-day disabled list from the 15-day DL to open a roster spot on the 40-man roster for Johnson. ... Walker, the Pirates' second baseman, was not in the lineup for the first time since July 31, but he pinch-hit in the ninth inning and stayed in the game. ... Arizona RHP Randall Delgado (4-3, 3.53 ERA) will face Cincinnati RHP Bronson Arroyo (11-9, 3.35) on Monday night. ... Pittsburgh is off Monday before opening a three-game series with the Padres on Tuesday night in San Diego.