
I had a dog like this. It took a good few weeks but I did sort it out. I started off walking far away from other dogs so that he could just about see them in the distance. If he saw any and was quiet, I praised a LOT. If he made a noise, I ignored it and moved further away. Slowly, slowly over a period of time we would move closer and closer, until he was finally able to be right next to other dogs without barking or growling. The one thing to really avoid is any kind of punishment or shouting when a dog does this, as they will then associate other dogs with unpleasant experiences which will make it all worse, or if you start shouting, they think you agree with them and are joining in. :)
Marianne