Both Charlotte and Tiger are correct, as both blacksmiths and barbers pulled teeth. Interestingly, many of the instruments used by dentists today trace their origins back to those used by blacksmiths.
Barbers developed into barber surgeons and then into surgeons.
Surgeons these days are still referred to as 'Mr' rather than 'Dr' to differentiate them from the 'physicians', who were originally the 'educated' medics of their day.
Dentistry is one of only two health professions regulated by closure of function (what is done by the profession) rather than closure of title (what the professional is called). It is a criminal offence for anyone but a dentist (or another regulated member of the dental health team, now that new regulations have come into force) to put his hands into your mouth for the purposes of treatment of teeth. This is why maxiofacial surgeons, despite having a medical degree, also have to do a dentistry degree.
The other 'health profession' regulated by closure of function is veterinary medicine.
The title 'Doctor' is not protected by law in the UK - anyone can call themselves 'Doctor'. Medical practitioners use the title 'Doctor' as an honorific, as do several other health professions, as they don't get doctorate degrees.
And for your most useless piece of information of the day, farriers (closely related to blacksmiths) were the first 'profession' to be subject to statutory recognition and regulation in the UK and they are still the smallest regulated profession.