Pete Alonso drove in Brandon Nimmo in the bottom of the ninth inning as the Mets survived a blown lead to beat the Rockies 7-6.