Josh Roenicke (2-0) pitched 1 1-3 innings in relief of Jeff Francis to earn the victory. Roenicke was one of four Rockies relievers who combined for four scoreless innings while giving up two hits.
Rafael Betancourt worked the ninth for his 11th save in 14 chances.
Marco Scutaro had a pair of hits for the Rockies, who had lost 12 of 13 games entering Thursday.
Jimmy Rollins hit a leadoff home run for Philadelphia, which was looking for its first three-game sweep of the season.
The Phillies were reeling, losing 12 of 15, prior to taking the first two in the series from the Rockies. They didn't do much after Rollins' homer.
Francis pitched five solid innings, allowing one run on six hits. He was lifted after 76 pitches as the Rockies are using a four-man rotation and limiting their starters to 75 pitches
. It was the third start of the season for Francis, a former Rockies first-round pick who was re-signed by Colorado on June 9 after being released by Cincinnati. The soft-tossing lefty retired 11 of his final 13 batters he faced after giving up hits to four of the first seven batters.
The Rockies went ahead 2-1 in the seventh on Nelson's two-run homer. Tyler Colvin singled with one out and Nelson connected with two outs against Vance Worley (3-4).
It was the fifth homer this month in 45 at-bats for Nelson, who didn't have a homer in April or May over 73 at-bats.
Rosario connected with two outs in the ninth off Michael Schwimer. Rosario leads major league rookies with 11 homers.
Worley made his fourth start since coming off the disabled list on June 4 with right elbow inflammation. He has pitched well in the four starts, with a 2.25 ERA, but has two losses and a pair of no-decisions.
The right-hander had allowed just three singles through 6 2-3 innings before Nelson's homer.
The Phillies squandered a chance to score in the second. John Mayberry Jr. led off with a double and went to third with one out on third baseman Jordan Pacheco's throwing error on Worley's grounder. But Francis got Rollins to pop out and Juan Pierre to fly out to end the threat.
Pinch hitter Ty Wigginton, who started the Phillies' two-out rally in the ninth Wednesday night with a single in a 7-6 win, led off the eighth with a double off the wall in right-center. But right-hander Matt Belisle struck out Hunter Pence, got Carlos Ruiz to fly out to deep center and induced an infield popup by Shane Victorino.
NOTES: Rockies SS Troy Tulowitzki had surgery on his left groin on Thursday to remove scar tissue and will miss at least six weeks. ... The crowd of 43,805 on a 95-degree night was the Phillies' 238th consecutive regular-season sellout, and 254th in a row counting the postseason. ... Colorado opens a three-game interleague series at Texas on Friday night, with Rockies LHP Christian Friedrich (4-3, 5.60 ERA) facing former Phillies RHP Roy Oswalt, who will be making his season debut for the Rangers. ... Philadelphia opens a three-game series at home against Tampa Bay on Friday night, with Phillies LHP Cliff Lee (0-3, 3.48) still looking for his first victory of the season against Rays RHP James Shields (7-4, 3.72).