I recently attended a lecture in which an Italian medievalist claimed that the english nouns "elf" and "goblin" as present in Tolkien come from the medieval guelfs and ghibellines. He said that this was based upon the development of a concept of guelfs as good, pure, and for justice, while ghibellines were the opposite. This claim seems somewhat far-fetched, since these creatures existed in the folklore of non-Italian cultures. Is this a case of English appropriating sounds and concepts from Italy to describe another culture, or just convenient coincidence?
The first citation in the Oxford English Dictionary for elf is in a line from Beowulf, and it has cognates in other Germanic languages. It's derived from a root meaning "white", *h₂elbʰ-, reflected in Latin albus 'white' and Russian lebed' 'swan'. So no, it's not related to Guelph.
The etymology of goblin is less certain, but it's attested in English in the 1320s (again according to the OED). It's certainly not from Ghibelline.
edit: /u/itsallfolklore might have more to say about the historical conceptions of elfs and goblins pre-Tolkien.
Thanks to /u/rusoved for the summons. He's absolutely correct in his assessment. A few additional thoughts:
The word "elf" is clearly indigenous to the Germanic-basic languages of Northern Europe. It appears to be a circumlocution - i.e. a name used to avoid the sacred name. In this case, referring to the supernatural beings as the bright or shimmering ones would be out of respect, assuming they would take offense if their real name. It is not uncommon for sacred terms to be circumlocuted out of existence, but in this case, it is just as likely that there never was a sacred term for these supernatural beings and people simply resorted to using respectful descriptive terms as a matter of courtesy. Eventually, as the term "elf" lost its original meaning, people tended to avoid it by calling these entities something like "the good neighbors" or any number of other names, using circumlocutions to avoid the term "elf" - which people feared the supernatural beings might resent, since they would not like being called out by their actual names.
As /u/rusoved indicated, "goblin" is a more difficult matter, but it is certainly not derived from the Italian. It may be a borrowing from Middle English from the French, but the Welsh term "coblynau" for the same sort of entity would need to be explained as a borrowing from English (which is not impossible). And the German "kobold" appears to provide some evidence for the widespread nature of the term. When it comes down to it, it is a term of uncertain etymology and meaning. But it is clearly part of the English language from a fairly early period. No need to go to Italy for anything more than the food, wine, and art, which is quite enough.