DENVER -- The Rockies' Garrett Atkins went 0-for-4, completing the night by swinging through a Brian Wilson fastball that darted out of the strike zone before his bat arrived. That's how the Rockies' 6-5 loss to the Giants at Coors Field on Tuesday night ended.

But even the loss, which ended a three-game win streak, left Atkins and some of his teammates feeling as though another step had been taken toward turning around a rough beginning of the season.

The Rockies trailed by three runs going into the bottom of the ninth and were down to their last out, but Scott Podsednik doubled, Clint Barmes launched a two-run homer, Matt Holliday doubled and Todd Helton drew an intentional walk to put the game on Atkins' bat.

"We played well, I thought," said Atkins, who went 0-for-3 with runners in scoring position Tuesday and is batting .208 in that situation, despite a .335 season average. "Obviously, [winning pitcher Tim] Lincecum is tough. But Wilson on the back end, we were able to get some runs off him. He's done a pretty good job for them. So we've got a lot to feel positive about and take that into tomorrow."

Granted, at 18-28, the Rockies have a lot of turning around to do. But they can't always expect to go 21 of 22, like they did last year to go from also-rans to pennant winners. Normal comebacks have losses from which to draw encouragement.

For example:

• Right-handed starter Aaron Cook (6-2), who has lost his last two after winning six straight, teetered through the first four innings, giving up four runs. But his final three innings were scoreless and effective.

• The Rockies were patient against Lincecum (6-1), forcing him to throw 113 pitches in six innings. Colorado had five hits, drew four walks and a hit batsman and saw Lincecum fire two wild pitches that led to runs.

• Barmes had fanned three times in his first four at-bats, but his homer to left field off Wilson (13 saves) gave him a 13-game hit streak, which matches his career best (July 9-25, 2006).

"I can't say we should be all that upset -- we just got beat by a good pitcher who threw well," said Barmes, who has five home runs this season and a .469 average during his streak (23-for-49). "The guys that came in for him, they threw well and they beat us.

"Cookie kept us in it; then we just couldn't catch them at the end."

Cook yielded first-inning doubles to Randy Winn and Bengie Molina, and both scored. Rich Aurilia led off the second with a home run. Omar Vizquel's squeeze bunt with John Bowker at third in the fourth inning gave the Giants a 4-2 lead.

But a brief reminder from pitching coach Bob Apodaca helped Cook.

"I was in a funk and Dac just grabbed me aside and said, 'Stay loaded and finish your pitch,'" Cook said. "A couple little words got me back on track, and I felt better about the last three innings."

Lincecum also labored early.

Cook drove in the Rockies' first run off Lincecum in the second on a two-out single, after Omar Quintanilla singled and took second on a wild pitch. The Rockies scored in the third and fourth, but that was more a function of Lincecum's wildness than hitting. Lincecum walked the first two batters of the third, and Quintanilla scored on a wild pitch in the fourth.

"I was saying, 'Come on, find it first. ...'" Cook said of his grasping for rhythm as Lincecum was doing the same. "Unfortunately, I found it one run too late.

"I've had some games where I've gone out there and it's been easy for me, and the last couple I've had to struggle to just keep the team in the game."

The Giants' Fred Lewis launched a one-out solo shot off reliever Alberto Arias, and Aaron Rowand added a two-out RBI single in the ninth, but the Rockies had a chance in their final at-bat.

"They're going to play until the end, until the last out is made," Rockies manager Clint Hurdle said. "That's the way they came into the ninth. That's the way they came into the eighth. That's the way we come into every inning, and we were retired 13 times in a row through one stretch."