Boiled sugar disaster?
It sounds like a stray sugar crystal fell into the mix--that's all it takes to kick off the crystallization you noticed. Ensure there is no undissolved sugar on the sides of the pan by wiping with a wet paper towel. Do so early though so you don't risk knocking them in at a susceptible point.