The Rockies owned a five-run lead heading into the sixth before Galvis fueled the comeback.
Philadelphia scored three times in both the sixth and seventh innings to take the lead and Jonathan Papelbon worked out of a ninth-inning jam to preserve the victory.
With two away in the seventh, Galvis again tripled to bring home Domonic Brown and John Mayberry. Jimmy Rollins followed with a single off Wilton Lopez (1-3) that brought home Galvis with what turned out to be the winning run.
The rally gave the win to Michael Stutes (2-0), the third of seven Philadelphia pitchers who walked one in his only inning of work.
Papelbon surrendered a one-out single to Carlos Gonzalez in the ninth and Gonzalez promptly stole second. Neither Michael Cuddyer nor Todd Helton could come up with a clutch hit, however, and Papelbon collected his 13th save in as many opportunities.