As many children develop a fear of dogs from around the age of 3 1/2 - 4 years old, I've looked up some advice on overcoming this problem. Obviously children need to be careful around dogs they do not know, but they also need to be able to walk down a road without fearing having to pass an animal.
To overcome this fear, you need a gentle approach, start by talking about dogs and puppies, read stories about them, draw and colour pictures, go to the toy shop and choose a soft toy that the child can cuddle and 'care for'.
The next step is to find a friend or family member with a calm and quiet dog that likes children, not a yappy, boisterous thing! Hold the child's hand so that he/she feels secure, then calmly and confidently walk into the room where the dog is and sit down on the opposite side of the room. Together you should look at the dog and discuss how it looks, is it warm? does it look soft? do you think it would like a new friend? Over the course of a few visits, keep reminding the child that the dog would like to be friends, gradually move closer until eventually the child can touch the dog, then stroke it. The dogs' friendly reaction and warm soft coat will help him/her to overcome his/her fear.
Don't forget though, you need to let the child know in a non-frightening way (you don't want to undo all that hard work!) that some dogs can be dangerous. "Don't go near or touch a dog you do not know."