The Rockies won for just the second time in 14 games, the triumph coming one night after they had blown a ninth-inning lead against the Phillies.
Nelson hit his home run in the seventh to put the Rockies in front and Rosario added some insurance with his blast in the ninth.
Colorado starter Jeff Francis allowed a run on six hits in five innings and did not figure in the decision. The win went to Josh Roenicke (2-0), who went 1 1/3 innings in relief of Francis.
Rex Brothers, Matt Belisle and Rafael Betancourt finished off the outstanding bullpen effort, with Betancourt claiming his 11th save. Betancourt gave up two ninth-inning runs Wednesday in Philadelphia's 7-6 victory.
The only run for the Phillies on Thursday came on a first-inning homer by Jimmy Rollins.
Vance Worley (3-4) gave up the homer to Nelson and was saddled with the loss. He allowed only four hits over seven innings.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Exploding whale video goes viral on Internet