Huston Street pitched out of trouble in the ninth to secure the win for Colorado. He retired Shane Victorino on a soft liner to second to leave the potential tying run - Game 1 winner Cliff Lee - at second base.
Hamels, the World Series and NLCS MVP last year, looked nothing like the guy who was so dominant during Philadelphia's championship run last October. The left-hander allowed four runs and seven hits in five innings. He didn't stick around after departing, rushing off to be with his wife, Heidi, who was in labor with the couple's first child.
The best-of-five series shifts to Denver for Game 3 on Saturday. Jason Hammel (10-8) will start for the wild-card Rockies against a yet-to-be-announced pitcher. The Phillies could use Joe Blanton, J.A. Happ or Pedro Martinez.
Blanton pitched one inning in relief, allowing a run. Happ faced one batter and got knocked out of the game when Seth Smith hit a hard liner off the lower part of his left leg. X-rays on Happ's leg were negative.
Making his third start since a shoulder strain sidelined him for most of September, Cook allowed three runs and seven hits in five-plus innings. The right-handed sinkerballer got 12 of his 15 outs on grounders or strikeouts.
After Lee turned in a masterful performance in his playoff debut Wednesday, the Phillies were counting on Hamels to give them a commanding 2-0 series lead. But Hamels hasn't been the same pitcher since going 4-0 with a 1.80 ERA in five postseason starts last year. He was 10-11 with a 4.32 ERA this year, and now is 0-7 in day games.
The Phillies are trying to become the first repeat champions since the New York Yankees won three World Series in a row from 1998-2000. No NL team has done it since the Cincinnati Reds in 1975-76.
For the second straight day, the Phillies had the largest crowd in the six-year history of Citizens Bank Park. There were 46,528 fans packed in the ballpark, waving their white-and-red "Fightin' Phils" towels. Now, there's no guarantee they'll see another game this year.
Jayson Werth's solo homer off Rafael Betancourt in the eighth got the Phillies within a run and whipped the fans into a frenzy.
But Franklin Morales came in and retired Raul Ibanez on a sharp grounder. Street, who was 35 for 37 in save chances in the regular season, started the ninth.
He walked pinch-hitter Matt Stairs with one out. Lee, who became the first Phillies pitcher to steal a base in the postseason in Game 1, ran for the slow-footed Stairs. After Miguel Cairo flied to right, Jimmy Rollins singled to right. But Street got Victorino to end it.
Trailing 4-0, the Phillies finally got going in the sixth. Victorino led off with an infield single and advanced to second on second baseman Clint Barmes' throwing error. Chase Utley followed with a single and Ryan Howard lined an RBI double into the right-field corner, chasing Cook.
Jose Contreras came in and struck out Werth. But Ibanez followed with a two-run single to cut it to 4-3.
After Happ was forced out in the seventh, Scott Eyre came in with the bases loaded and nobody out. He struck out Carlos Gonzalez before Dexter Fowler's sacrifice fly made it 5-3. Eyre retired Todd Helton to end the inning.
The Rockies took a 3-0 lead in the fourth when Torrealba connected off Hamels. Torrealba had just two homers in 213 regular-season at-bats, but he ripped a hanging curve into the seats in left.
Rockies manager Jim Tracy flip-flopped his top two hitters and it paid off right away. Gonzalez led off with a single. He stole second on an attempted pickoff, easily beating first baseman Howard's double-clutch throw.
Gonzalez advanced to third on Fowler's sacrifice and scored on Helton's 20-foot dribbler down the first-base line, giving the Rockies their first lead of the series.
Gonzalez singled his next time up in the third and was picked off again, but this time Howard quickly fired to second to get him. After Cook hit a one-out single in the fifth, Gonzalez lined a double to right-center. Fowler followed with a sacrifice fly to left to make it 4-0.
NOTES: Blanton's relief appearance was his first since the 2006 ALCS with Oakland. ... Hamels is 10-13 with a 4.66 ERA lifetime in 37 day starts. ... Fowler hit both sacrifice flies on 1-2 pitches. ... Cook was 1-5 with a 5.85 ERA against the Phillies. ... The Phillies had won eight straight home games in the postseason. ... Rookie LHP Antonio Bastardo struck out Colorado pinch-hitter Jason Giambi to leave the bases loaded in the eighth.