For reference, the four passages are:
The Two Towers, The King of the Golden Hall:
‘If this is bewitchment,’ said Théoden, ‘it seems to me more wholesome than your whisperings. Your leechcraft ere long would have had me walking on all fours like a beast. No, not one shall be left, not even Gríma. Gríma shall ride too. Go! You have yet time to clean the rust from your sword.’
The Two Towers, The Road to Isengard:
‘My men are weary with battle,’ said the King; ‘and I am weary also. For I have ridden far and slept little. Alas! My old age is not feigned nor due only to the whisperings of Wormtongue. It is an ill that no leech can wholly cure, not even Gandalf.’
The Return of the King, The Battle of the Pelennor Fields:
Then the prince seeing her beauty, though her face was pale and cold, touched her hand as he bent to look more closely on her. ‘Men of Rohan!’ he cried. ‘Are there no leeches among you? She is hurt, to the death maybe, but I deem that she yet lives.’ And he held the bright-burnished vambrace that was upon his arm before her cold lips, and behold! a little mist was laid on it hardly to be seen.
The Return of the King, The Houses of Healing:
So at last Faramir and Éowyn and Meriadoc were laid in beds in the Houses of Healing; and there they were tended well. For though all lore was in these latter days fallen from its fullness of old, the leechcraft of Gondor was still wise, and skilled in the healing of wound and hurt, and all such sickness as east of the Sea mortal men were subject to. Save old age only. For that they had found no cure; and indeed the span of their lives had now waned to little more than that of other men, and those among them who passed the tale of five score years with vigour were grown few, save in some houses of purer blood. But now their art and knowledge were baffled; for there were many sick of a malady that would not be healed; and they called it the Black Shadow, for it came from the Nazgûl.
"Leech" is an old English word for "doctor", appearing as "lech", "leech", "leach" in Early Modern English, and a wider variety of similar spellings in Middle English, and "lǽce" in Old English.
While "leech" has almost completely dropped out of use as "doctor" in modern English, cognates are common in other Germanic languages, and other languages too: Norwegian (in both Bokmål and Nynorsk) "lege", Icelandic "læknir", Swedish "läkare" (from which comes Finnish "lääkäri"), Faroese "lækni", Danish "læge", and similar words in many Slavic languages, such as Polish "lekarz", Serbo-Croatian "lečnik", and some Gaelic languages, such as Scottish Gaelic "lighiche". In Slavic and Gaelic languages, it appears to be a very old word, possibly coming from from Proto-Germanic, or possible an older common Indo-European word.
The origin of the name "leech" for the blood-sucking worm is less clear. It might come from an Old Germanic word for leech that was not the same as the Old Germanic word for doctor, and have converged on "leech" due to the use of leeches in medicine. Cognates of "leech" for the leech are less common in other languages than cognates of "leech" for doctor - only Dutch "laak" comes to mind, and this is the least-used of the Dutch words for the leech, the others being "bloedzuiger" (literally "bloodsucker", which is a very common name for the leech in many Germanic and Romance languages) and "echel" (from old Germanic roots, and cognates are common in Germanic languages, and some non-Germanic languages, such as Finnish "iilimato", which is from Swedish "igel", cognate of "echel" and "mato" meaning worm (Finnish also has "juotikas", meaning "drinker")).
The origin of "leech" for doctor might be Proto-Indo-European *leg-, "to collect", "to gather", due to the use of various plants (e.g., medicinal herbs) in medicine: "gatherer" = "doctor". Notably, in Old Irish languages, cognates of "leech" have a wider meaning than in English, meaning "magician" and "exorcist" in addition to "doctor".
As you may well be aware, Tolkein was a "Professor of Anglo-Saxon" at Oxford, and was a gifted linguist with a particular interest in Old English. There are a number of Early Medieval English references throughout The Lord of the Rings, and in particular the language of the Rohirrim is based very heavily on the Mercian dialect of Old English, including a lot of names like Theoden, Eomer and Eowynn.
Tolkein's use of leech in this context is another example of Old English creeping into The Lord of the Rings. Leech is the Old English word for 'doctor' or 'healer', attested most famously in the title of 9th Century Medical textbook known as Bald's Leechbook.