DENVER (AP) -- San Francisco Giants pitcher Ryan Vogelsong had a ready response when asked if he saw a way out of his recent struggles.
''Yeah,'' Vogelsong said. ''Stop being bad. I'm costing us games right now and I'm not real happy about it.''
Colorado pitcher Alex White homered off Vogelsong, and the Rockies went on to beat him for the first time in a 6-5 victory Monday night that snapped their five-game losing streak.
Buster Posey and Hunter Pence went deep for the Giants, who lost for only the second time in 10 road games. San Francisco's lead in the NL West was trimmed to five games over the idle Los Angeles Dodgers.
Vogelsong (12-8) allowed four runs and six hits over five innings in losing for the first time in seven career starts against the Rockies. He is 2-3 with a 9.57 ERA in six starts overall since Aug. 13, allowing 28 runs and 43 hits in 26 1-3 innings.
''I'm just not making pitches, missing locations,'' Vogelsong said. ''I felt like I actually got a little bit better as the game went on, so that's a good sign. I felt pretty good about the last couple of innings I threw and I can build off that. But a couple of bad starts in a six-game span is not going to get me down. I'm a battler, guys.''
San Francisco manager Bruce Bochy said he's sure Vogelsong's pitching fortunes will turn around soon.
''He's one of our guys and he's going to be out there,'' Bochy said. ''We have all the confidence in the world in him. He's done an unbelievable job for us this year. Vogie is going to be just fine.''
The right-hander entered 5-0 with a 1.80 ERA in six previous starts against the Rockies, and the Giants had won all six games. But he was in trouble from the outset this time, allowing successive doubles to Tyler Colvin and Josh Rutledge, the first two batters he faced. One out later, Jordan Pacheco hit an RBI single to put the Rockies up 2-0.
The Giants trailed 6-2 before they got a two-run homer from Posey in the seventh inning off reliever Rex Brothers and then pulled within one in the eighth. Brandon Crawford drew a one-out walk from Matt Belisle, pinch-hitter Aubrey Huff singled and Angel Pagan followed with an RBI double, his third hit of the game.
Belisle got out of the jam by retiring Marco Scutaro and Pablo Sandoval.
Guillermo Moscoso (2-1) picked up the victory by working two innings, allowing one run on three hits. Rafael Betancourt pitched a 1-2-3 ninth for his 28th save in 33 chances.
''Sure, this was a tough game to lose, especially the way we battled back, but we've just got to put this one behind us,'' Bochy said. ''You like having a five-game lead because it does give you a margin of error. But you don't want to slide in the back door. We need to win ballgames.''
Colorado manager Jim Tracy was ejected in the bottom of the seventh by second base umpire Angel Campos after a heated argument over an inning-ending double play. Campos ruled that Scutaro tagged Rutledge before throwing to first to get Carlos Gonzalez. Tracy, ejected for the third time this season, argued that Scutaro missed the tag.
The Rockies also lost catcher Ramon Hernandez to a left hamstring strain sustained while running out a double in the fourth. He was replaced by pinch-runner Wilin Rosario, who advanced when Chris Nelson reached on first baseman Brandon Belt's fielding error and came home on Charlie Blackmon's double-play grounder.
White hit his first career homer in the second, offsetting a drive he allowed in the top of the inning to Pence for the Giants' first run.
''Got a good pitch,'' White said. ''He left it up in the zone. Put a good swing on it. It's not going to happen often, but I enjoyed it.''
A two-out error by Sandoval on Rosario's grounder to third opened the door to a pair of runs by the Rockies in the sixth. Nelson followed with a run-scoring triple and Blackmon added an RBI single to build a four-run lead.
White was lifted after allowing one run and six hits in four innings after throwing 76 pitches, roughly the limit for starting pitchers in the Rockies' unorthodox four-man rotation.
''I had pretty good command,'' White said. ''Obviously, I fell behind a few times. Pitched pretty well with my four-seam. Used my two-seam when I needed to. Had a good changeup. I threw 76 pitches in four innings. But that's what they asked me to do, so I'm going to keep doing it.''
NOTES: LHP Josh Outman was recalled from Double-A Tulsa before the game by the Rockies. ... Six of the 16 homers allowed by Vogelsong have come in his last four starts. ... White's homer was the first by a Rockies pitcher since May 7 when Drew Pomeranz went deep against San Diego's Edinson Volquez.