There has already been some great advice given but after going through the very same thing I can share what I did that worked for us
To begin with , as Lala suggested we would put the dog away if someone came to visit . Usually out the back yard ( as our dogs are usually in the house) or in the back room. Anywhere that is secure that they cannot continue to see the 'reason' the perceive to be a threat.
After a little while once they had accepted this and quietened down again we then proceeded to pretty much what Pawfectionist has advised .Including a vet visit , just in case. We also seemed to notice that the particular dog in question was much worse if it was myself that went to greet the visitors or I was there by myself. This dog was also extremely protective of myself. So for the first few weeks ( and it can be a true proverbial pain in the bum) we tried to have our visitors only come over when someone else could greet the visitor.
Slowly but surely we worked up to the dog was pretty much allowing anyone in though would still be watchful and wary if whoever it was got close to myself.
There is light at the end of the tunnel