i was thinking the same thing about him having a bad experience with another dog incident somewhere along the line. also, take a look on how you react when your dog is about to see another dog. your obviously nervous and apprehensive, they pick up on that real quick. you probably automatically tighten up on the leash which signals you are tense, then the dog senses trouble and reacts. i do think its fear based. not all dogs tuck tail and hide with fear issues. most of the time its the opposite. the mentality is "i am going to get you before you get me" type thing.
i would go back to square one, take a look at how you handle such situations, your reactions, actions, when this happens. i would also set him up slowly with distant encounters with non-reactive dogs. you will have better success this way.
the key is to catch the behavior before he flips out and is out of control. teaching to ignore, and focus on you.
i would seriously get some professional help. they can tell you what your doing wrong, and give you valuable tools and info to help you work with this issue.
some dogs never like other dogs, or are always going to be reactive from fear based issues. the key for you is to recognize the signs early and learn how to distract it from happening.
i would never hide him from the world, he needs to socialize in every way. but start off with the right tools, and slow encounters in a controlled inviroment to ensure confidence and success.
debbie