One of the most common sad situations is when dogs are under-socialized during their first critical weeks, from 8-12 weeks of age. During that time, a puppy should be exposed to everything that you want him to tolerate as an adult dog. That means umbrellas, guys with baseball hats on, guys with baseball hats on backwards, sliding doors, infants, different surfaces, stairs, other dogs large and small, pocket pets, different foods, the beach, the pet store, the park, everything. When dogs don't get that, there will usually always be things that scare them, or that they are anxious about. And, at its worst, they don't learn their native canine language very well and may be unable to respond to or issue appropriate signals to other dogs. They can bark and lunge on leash. Or, they can cower and run backward (these dogs need a harness or martingale collar, since many of them are lost when they back out of a flat collar, and are lost). There are some excellent references on how to deal with a cautious, shy, under-socialized, or reactive dog. These are my recommendations (you can get them all at dogwise.com):
Help for Your Shy Dog by Deborah Wood; Click to Calm by Emma Parsons; Feisty Fido and The Cautious Canine by Patricia McConnell; Scaredy Dog - Understanding and Rehabilitating Your Reactive Dog by Ali Brown.
It's important to remember that this training must go at the dog's pace, not yours, and it can be painfully slow. You may never have a dog that is happy to go up to anyone or any dog, but you should be able to train your dog to look to you for guidance when he/she is nervous. Focus on the handler is the key to this kind of training.