I'm trying to figure out where the term イギリス for the United Kingdom came from.
I suspect 英国【えいこく】 because they sound similar, but that seems a bit odd as Katakana words are usually loan words.
After further research I can say that in fact, イギリス actually came from Portuguese and first appeared in the 日葡辞書【にっぽじしょ】 (Vocabulario da Lingoa de Iapam) compiled by a Jesuit Missionary in Nagasaki in 1603, the start of the Edo Period. It came from the Portuguese word
inglês which would have been pronounced イグレス and after interactions with Great Britain, the word changed from イグレス to イギリス.
Sometimes you can hear an alternative explanation, such as here on chiebukuro (Japanese). According to this link, イギリス came from the Dutch word (knowing no Dutch I assume to be a variant of
Engels) which in Japanese was for some reason pronounced エゲリス. The interactions with the Dutch when discussing England happened during the Edo Period (AD1603 - AD1868) and after interactions with Great Britain, the word would have changed from エグリス to イギリス。
However, reflecting my research above, the person responding to the question at chiebukuro appears to be wrong.
For reference, the original explanation from chiebukuro: