Occasional Hysterical Reactions to Dogs is Normal, Unfortunately
If you have a dog, especially a medium or large dog, no matter what you do you will eventually encounter humans who think you and your dog are disgusting and horrible.
Undoubtedly, many of these interactions are entirely the non-dog-loving human's own fault, but the humans seem to be under the impression that they get to wingnut around where ever and how ever they please. Which is actually kinda sorta true.
And let's be honest with ourselves here that most of the time even dog people can't read dog body language.
The fact is that not everyone wants to meet dogs. Even friendly ones. Have you noticed how dogs put their noses directly ON whatever they're sniffing? Have you noticed that the nose is very proximate to the mouth, which is often a moist and slimy area? Even if the person isn't afraid of dogs--which many people are--they probably don't want a big slimy slug trail all over their hand/thigh/face/crotch.
It seems really reasonable to have enough control over and attention to your dog to prevent him or her from touching random people. We realize that this kind of training takes some time and patience and exists on a list with about 5,000 other behaviors you will need to train, so in the meantime there are bound to be some uncomfortable incidents. Assess what went wrong and think about how you can prevent that behavior in the future. You could also apologize, but sometimes that just opens the door for the person to inform you of what a jackass you and/or your dog is as though you can turn back time and somehow un-slime their pants/hand/baby/lunch.
So how do you keep your dog from meeting every person in the universe? Yup, there's a resource for that. This link focuses on greetings with other dogs, but the same goes for greeting people.
What about off leash? Things get tricky here. That's a whole blog post in itself. For now, work on the recall, and variations on it like "this way" which means "move in the direction I am moving". We can cover that in a future post.
If you have a crappy dog-based interaction with one of your fellow humans, it really isn't always your fault, though. I've moved off the sidewalk--a public space--onto the grass with my leashed pooch to let someone pass, and as they hurried by they furiously demanded that I walk my dog in the street. Declined, dear sir! Seriously, though, life is short. Just keep walking.