The Padres let a four-run lead slip away, but finally came through in the 12th after loading the bases against Manny Corpas (0-1).
Pinch-hitter Yasmani Grandal hit a one-out grounder to third base and the Rockies were only able to get a force out at third on the play.
The game had been tied at 5-5 since the eighth, when Colorado's Wilin Rosario hit a two-run homer. Rosario also contributed an RBI double in the sixth.
Luke Gregerson (4-2) worked two innings of one-hit relief to pick up the win. He struck out three. Brad Boxberger survived a walk in the bottom of the 12th to collect the first save of his career.
Boxberger earned the save in his 28th career appearance scattered over two seasons with the Padres.
Boston schools pull out free condoms over wrapping complaints
Ray Liotta sues skin care company over use of likeness