The basic principle is that it is not permissible for men to use gold, whether as an adornment or for medicinal purposes, except in cases of necessity.
If a specialist doctor thinks that treatment of the tooth, whether by using a bridge, filling it or inserting a screw to fix it, can only be done using gold, there is nothing wrong with that. But if it is possible to treat the tooth just as well using some other material, then it is not permissible to use gold, because of the report narrated by Urfujah ibn Asad (may Allah be pleased with him) who said: My nose was cut off on the day of (the battle of) al-Kulaab during the Jaahiliyyah, so I had a nose made of silver, but it began to smell bad, so the Messenger of Allah (blessings and peace of Allah be upon him) told me to get a nose made of gold.
Narrated by at-Tirmidhi, 1770; classed as saheeh by Shaykh al-Albaani (may Allah have mercy on him) in Saheeh at-Tirmidhi
An-Nawawi (may Allah have mercy on him) said: With regard to the view of the author, that in cases of necessity it is permissible to use gold, this is agreed upon (among the scholars). Our companions said: It is permissible to use an (artificial) nose or tooth made of gold or silver; similarly, putting fillings of gold and silver in teeth is permissible.
End quote from Sharh al-Muhadhdhab, 1/312
It says in al-Mawsooah al-Fiqhiyyah, 11/121:
The fuqaha' are unanimously agreed that it is permissible to use a nose made of gold. The Malikis and Hanbalis, and Muhammad ibn al-Hasan among the Hanafis, and the Shaafais, said: (This also applies to) teeth. And the Shaafais added: fingertips. The Maalikis and Hanbalis also stated that it is permissible to treat a tooth or teeth with gold. The basic principle concerning that is the report about Urfujah ibn Asad (may Allah be pleased with him). â¦ And al-Athram narrated from Moosa ibn Talhah, Abu Jamrah ad-Dabi. Abu Raafi ibn Thaabit al-Banaani, Ismaaeel ibn Zayd ibn Thaabit and al-Mugheerah ibn Abdullah, that they fixed their teeth with gold.
It says in Fataawa al-Lajnah ad-Daa'imah (24/70): If the dentist is skilled and thinks that it is better for you to have a tooth made of gold rather than anything else, then it is permissible for you, otherwise it is not. End quote.
They also said (24/56): In cases of necessity it is permissible to use gold to make an (artificial) tooth, nose and so on, if nothing else could be used instead. End quote.
Shaykh Ibn Uthaymeen (may Allah have mercy on him) was asked about the ruling on having gold teeth.
He replied: It is not permissible for men to have gold teeth except in a case of necessity, because it is haraam for men to wear gold or use it as an adornment. In the case of women, if it is customary for women to wear gold teeth, there is nothing wrong with that, and she may have her teeth plated with gold, if that is a customary kind of beautification, and does not constitute extravagance.
End quote from Majmoo Fataawa wa Rasaa'il Ibn Uthaymeen, 11/102
Based on that:
If the doctor who is treating you only used the screw made of gold because nothing else could be used instead, or because it is better for your teeth, there is nothing wrong with that. Otherwise it should be removed, unless doing so will cause harm, in which case there is nothing wrong with leaving it.
And Allah knows best.
Reproduced from Islam QA