I was hoping to get a response to my information request before responding but didn't want you to go too long without some help. The first thing that should be done is to rule out a medical cause for the sudden aggression. You can read about these here:
If there is no medical cause for the aggression, then it is strictly behavioral. Dogs are aggressive toward other dogs for a variety of reasons. It might be that they are fearful of other dogs and thus are aggressive before the other dog can be. In other cases, a dog is aggressive in order to dominate the other dogs and be the alpha member of the pack. Other causes could be that the dog feels they are te alpha member of the pack and as the alpha member they must protect the pack (you) from threats (other dogs). Without the responses, it is difficult for me to determine which is most likely. It is good that many of the same techniques are used regardless of the cause.
I also want to mention that owners sometimes make the situation even worse by tensing up and worrying about what will happen. The dog senses the owner worry and feels that he is justified in his aggressive stance because you are obviously worried about the dog. They don't know you are worried about them attacking, they just feel that you are worried and assume it is the other dog. So you need to try and relax as much as possible. Sometimes a muzzle helps you feel more relaxed.
You will need to have her obedience trained if you haven't already. If you can, I would do group classes (with the muzzle) and let the trainer know of the problem your dog has. It might take you a few months of basic training before he is ready for goup class. . Before you can get into classes, the following site will be helpful. Be sure and click on the link to the page on obedience at the bottom. and links on subsequent pages leading to detailed instructions.
Training works best if you train at least 30 minutes a day (two 15 minute sessions). I would start making your dog work via the Nothing in life is free program (NILF). It is outlined below.
Dogs like knowing what is expected of them and they love the little paper thin slices of hotdogs that I use for treats while training. Give this a try and see how it works for you.
It will be helpful if you can find someone with a dog to help you once you have your dog listening to commands consistently. What you will do is have your dog on the leash. You will have your helper off in the distance. Your helper will gradually move their dog a bit closer to you preferably walking past your position in the distance. As long as your dog ignores them, you can give your dog praise and a treat. The second you see her fixate on the other dog or show any other sign of aggression (hair standing up, etc.) give your dog a correction by giving a short tug and a firm low toned "NO". It shouldn't take your dog long to realize you will not tolerate the aggression and that if she ignores the other dog, she gets treats. Once this happens you can repeat the training moving the other dog closer until she is no longer trying to lunge at other dogs.
Bat training might also be an option for this situation. Read about it here:
I almost forgot to mention that by turning and leading her away when she acts like this, she may be achieving her desired result of not having to pass by the dog. So I would try a different tactic such as I mention above or having her sit off to the side and wait for the dog to pass or keep a brisk walk past the other dog while having a treat in your hand to distract her. Do not feed a treat, though, unless she is ignoring the other dog and acting in an acceptable manner.
I hope this information is helpful to you and you are satisfied with my response. If you would like any additional information or have more questions please don’t hesitate to press the reply to expert or continue conversation button so I can address any issues you still have .