D-backs slip past Rockies on Gosselin's walk-off single in 11th

PHOENIX -- Robbie Ray found his mojo after a rocky start, the bullpen was brilliant and the offense was just good enough for the Diamondbacks to squeak out a 4-3, 11-inning victory over the Colorado Rockies on Tuesday night in the first game of a season-ending six-game homestand.

Reserve infielder Phil Gosselin, acquired in a midseason trade with Atlanta, delivered the game-winner, a single through the right side of a drawn-in Colorado infield after reliever Brooks Brown had walked the bases loaded.

"It was awesome. You want to contribute any way you can if you're not starting," Gosselin said. "It's fun when you come up with the bases loaded and the infield in -- a lot of holes for you to find out there."

Gosselin's heroics would not have been possible without a second consecutive sturdy effort from Ray, who recovered from giving up hits to the first three Colorado batters and two first-inning runs. He ended up working six innings, throwing 98 pitches and giving up seven hits and three runs -- two earned.

"I just kind of told myself forget about it, bear down and get these next guys," Ray said.

The key inning for Ray was the fifth, when leadoff batter Charlie Blackmon reached second base on a hit that right fielder Ender Inciarte lost in the lights, then stole third when Jake Lamb failed to put down the tag on a throw from catcher Welington Castillo that clearly beat Blackmon to the bag.

Ray buckled down and got Jose Reyes on a popup to short, struck out Carlos Gonzalez (who had crushed his 40th home run in the third inning) and -- after an intentional walk to NL RBI leader Nolan Arenado -- retired Corey Dickerson on a popup to third.

D-backs manager Chip Hale said he complimented Ray on his mound presence and confidence after his previous start, and he saw another example of that on Tuesday.

"You watch the great ones, and they know they're going to get you out, and that's the way Robbie looked to me that night," Hale said. "He's a guy that we really want to lean on in the future for this rotation of ours."

Ray's record remains at 5-12, due in part to poor run support and his inability to consistently pitch deep into games, but he agreed with his manager's assessment of greater confidence to pitch at this level.

"Absolutely," he said. "My last two starts have been really good, the tempo's been great. Definitely here at the end of the year it's something huge going into next year to build off of."

Ray left after six innings, and Matt Reynolds, Andrew Chafin, Silvino Bracho, Daniel Hudson and Randall Delgado held Colorado scoreless over the final five innings. Bracho, Hudson and Delgado retired the final 10 Rockies batters, striking out six.

"The bullpen did a great job," Ray said. "Bracho came in and shut it down there. Everybody did their part. Hudson was filthy. It was great."

Follow Dave Lumia on Twitter