It’s important that you acknowledge your child’s fear, even if you don’t feel it’s logical. The worst thing you can do is to try and force your child to interact with dogs – that might just elevate the fear to a phobia, and it may become a lifelong problem.
Try telling your child that you will walk past a dog with him or her. Or even that you will hold him or her while the dog walks past you. Read books about dogs, and watch movies that feature them, or even play games with stuffed dogs. That way, your child can get used to the idea of dogs without the fear.
When the time comes, you can try to introduce your child to dogs gradually, starting with a gentle, quiet dog that you know and trust. Remember, even though you don’t want your child to be scared of all dogs, some dogs are dangerous, and a little caution is always a good thing. So while you’re encouraging interaction with gentle dogs, you can also reiterate the idea of not talking to dogs your child does not know.