My eldest growled and went to bite a vet once because she pinned him down in a corner, and after that I practically had to drag him in and shovel treats down his neck. When a vet came within spitting distance in the consultation room he would then urinate all over himself and scramble to get away usually falling over in the process 
That episode probably started about 7 years ago and within two years he was much better. I used to walk him by the vets and magic lots of treats out of my pocket for him even being willing to walk up to the door, then we'd walk away and go home. Eventually I could get him in the door, then to the consult room etc. He used to have to be sedated to have his anal glands done and similar he reacted so badly.
In the end we moved vets because I didn't rate the ones at the practice it started at, and the new vets were much more understanding. They were very patient with him and I think the different environment really helped him to have positive associations with the new place. I am very, very firm about how people handle him now but luckily I find most vets can tell he's a bit nervous (he gets giddy) and they get straight on the floor with him and effectively introduce themselves which seems to work really well.
I'm rambling now, but I just wanted to say it can and does get better, there are things that can be done. And for what it's worth, my lad is a golden retriever who I got as a puppy, so not the kind of dog you'd expect to have problems in the vets! Sadly he's spent lots of his life at the vets so we have met a couple of less good ones.
I've got another dog who reacts very differently if she is with me compared to anybody else (she seems to think I can't look after myself and will guard me) and so I have to be very firm with her, every dog has their quirks and it takes a long time to learn what those are.