Why did my ginger simple syrup develop such a disgusting consistency?
My guess is that: 

 1) The syrup wasn't acdic enough 


and  

 2) The sugar concentration wasn't high enough.


If the sugar concentration is high enough, the sugar so-to-speak draws the water out of bacteria by osmosis thus killing them. If you don't like the syrup to be too sweet, try adding lemon juice.