Brenton Doyle hit a walk-off, two-run homer in a five-run ninth inning and the Rockies overcame a nine-run first-inning deficit to beat the Pirates 17-16.