This is a tough question, and I understand how frustrating it is for you!
My main recommendation for you is going to be lots of patience and positive reinforcement. If your dog is barking while on walks, make sure to take lots of your pups favorite treats and begin practicing. Come up with a key word to get your dog to focus on you and ***nothing else***, and every time you pass a dog, use this command. If it works and your pup pays attention to you and does not bark, reward them with a treat. If not, redirect them away from the situation in a calm manner and try again. Again, this will require a lot of patience on both of your ends!
Another thing you can try, that I personally don't have any experience with, are bark collars. They make specific collars that will squirt water or citronella (or any other safe, bad smelling product) in your pups face every time they bark. They will soon see barking as something that is followed by a bad experience.
Last, I know this is not going to be very popular, but it is up to you to do it responsibly, is a shock collar. If your dog is getting to the point where you can't enjoy going out and both you and your pup are miserable and scaring those around you, you can try a properly used shock collar, that surprise, doesn't just shock your pup. It can work hand in hand with my first method, but when your pup starts barking a light shock/buzz can deter them from doing so. Most shock collars come with different settings - a beep, a vibration, and a shock. You should start with the beep overtime they bark. If they do not stop, move to the buzz, and if no change, then do a light shock depending on the size of your dog. Soon, they'll start remembering that a beep leads to a buzz and then a shock, and shortly you will only need to beep for them to know their behavior needs to be changed. This, along with tons of positive reinforcement when they are doing well is a great plan - as long as you are responsible and use the collar well.
Best of luck!
It is normal for all dogs to get excited, nervous or even territorial like mentioned below. I feel it probably wouldn't be normal if a dog didn't do that. It is within their instinct but with proper training and methods to use to help and teach him that when your voice is in command they listen=)