I was afraid of dogs from a very young age, what happened (although I couldn't remember it) was a large and over friendly labrador came over to my pushchair and licked my face continuously, and although I tried to push it away, nothing would make it stop. From then on I was afraid and can recall not wanting to be in the same room as a dog until I was at least 7, and after that age only if dog was restrained. I was always fine with rabbits and cats.
You could try the Dr. but I think they will recommend a desensitisation type therapy, where the child is subjected to gradual exposure to the feared creature. You could do this yourself if you know of a well trained placid dog who will help you!! You start by the child watching the dog through a window, or from the other side of a fence, a physical barrier between them. When this is OK to the child, the next step is to have both in the same room or garden, where the dog is restrained or can be trusted to just lie down and not approach the child. When the child is relaxed about this, you could progress to touching the dog, this is why it needs to be a dog who will just sit there and not try to lick or jump. One touch is sufficient at first, as the child becomes braver it can progress to stroking.
Eventually, with more and more exposure to a gentle natured dog who never responds adversely, the child should relax enough for the dog to be unrestrained and approach the child. If at any stage the child panics, you go back to the stage before, until there is complete confidence.
I wish my parents had done something similar for me, it took until I was 13 before I was confident around dogs!! The one that cured me was my aunts' border collie, the most well trained and gentle dog, and utterly trustworthy with toddlers.
Good luck, I hope this works for you and DD. It can be quite socially limiting, trying to avoid going to places where there might be dogs!!