The Sanskrit ārya- is the source of the word Aryan. Fortson explains how this word came to have racist connotations:
During the nineteenth century, it was proposed that this [*arya-] had been not only the Indo-Iranian tribal self-designation but also the self-designation of the Proto-Indo-Europeans themselves. (This theory has since been abandoned.) "Aryan" then came to be used in scholarship to refer to Indo-European. Some decades later it was further proposed that the PIE homeland had been located in northern Europe (also a theory no longer accepted), leading to speculations that the Proto-Indo-Europeans had been of a Nordic racial type. In this way "Aryan" developed yet another, purely racialist meaning, probably the most familiar one today. In Indo-European studies, "Aryan" (and Arisch in German) and "Indo-Aryan" are still frequently used in their older sense - "Aryan" to refer to Indo-Iranian (less commonly, Indo-European) and "Indo-Aryan" to refer to Indic.
The OED still has many etymologies containing the terms "Aryan" and "Indo-Aryan".
It was undoubtedly the work of the nineteenth century philologist Max Müller that helped popularize "Aryan" as a linguistic term. Müller is quoted as saying "an ethnologist who speaks of Aryan race, Aryan blood, Aryan eyes and hair, is as great a sinner as a linguist who speaks of a dolichocephalic dictionary or a brachycephalic grammar".
I was asked recently if Ireland and Iran were related. Unfortunately they aren't; the origin of Ireland and Irish is uncertain.