D&D occasionally uses "eldritch" as a simple synonym for "arcane".
The Eldritch Knight originates in D&D 3rd edition. The earliest appearance is the D&D 3.5 Dungeon Master's Guide (2003), where it was used as a kind of generic patch prestige class to make fighter/wizard or fighter/sorcerer multiclassing feasible. Earlier examples, like the Spellsword originally from Tome and Blood (2001), cost the character too many levels of spellcasting to be really viable.
The Eldritch Knight was really a generic class, without any fluff. Monte Cook, who had written the 3.0 Dungeon Master's Guide, complained about this in a blog post at the time, saying that prestige classes were originally intended to have more fluff and lore about them. Nevertheless, D&D 3.5 would sometimes use these as a patch to make multiclassing more practical. Similar prestige classes in the 3.5 DMG included the Arcane Trickster (rogue/wizard) and Mystic Theurge (cleric/wizard).
The word "eldritch", popularized by the works of Lovecraft, originally connoted an eerie, otherworldly sense, perhaps frightening and unnatural. However, the word's widespread usage in D&D has somewhat diluted this quality, and it often appears as a synonym for "arcane" without any eerie connotations. Writers who frequently used the word in this context included Skip Williams and Monte Cook. My guess is that the class couldn't be called the "Arcane Knight" because there was already an Arcane Archer and an Arcane Trickster, and they wanted a synonym.
There's no particular lore of the Eldritch Knight having an otherworldly or eerie quality. They're functionally just like a Spellsword: some ordinary person who studied both fighting and arcane magic.
The sense of "otherworldly, eerie" is still used in some D&D books. For example, the sunfly swarm (Book of Exalted Deeds) is described as having an "eldritch, otherworldly quality". My guess is that there's a division between D&D writers: those who knew the word from reading Lovecraft, for whom it connoted eerieness; and those who only know it from the original D&D sourcebook Eldritch Wizardry, whose title implies the word to mean "magical" without further context.
The word "Eldritch" is often associated with the D&D 3.5 Warlock class, first presented in Complete Arcane (2004). However, this is unlikely to have influenced the Eldritch Knight, as Complete Arcane was not published until after the 3.5 DMG, and the two share no lore. The association between "warlock" and "eldritch" is solely limited to that class' signature ability Eldritch Blast and other abilities which modify Eldritch Blast. The word "eldritch" is not even unique to the warlock within Complete Arcane, being used to refer to the power of the Green Star Adept.
In D&D 4th edition's Adventurer's Vault 2, "eldritch" loses its Lovecraftian meaning even further, where it references the Eldritch Panoply, a set of magic items of an ancient group of swordmages called the Eldritch Knights. In that context, "eldritch" has no other meaning than to refer to this one particular guild. There was also an Eldritch Knight paragon path in Dragon #395, and D&D 4e also used the term "eldritch" in its Warlock class.
D&D 5th edition returns the Eldritch Knight as a fighter archetype, where just as in 3e it was merely a solution to the fighter/wizard combination, with no other direct lore implications. The word "eldritch" also appears in the warlock's Eldritch Invocations class feature, where it refers to forbidden magical lore, though there is no direct connection between this and the Eldritch Knight.
Regarding the meaning of "eldritch" in D&D
In D&D, there's this fundamental variety in the way the word "eldritch" is used. Both before and after the publication of the Warlock class in 2004, you see it both as a general synonym for "magical", and as having a darker meaning: mysterious, scary, ancient but also magical.
You first see the word used in Eldritch Wizardry (1976), one of the first D&D books, which kind of pinned down a connection for a lot of writers between the word and arcane magic, the sort of magic wizards use in D&D.
Skip Williams, who co-wrote the 3.0 core rulebooks, often appears to use the term as a simply synonym for "arcane magic". We see this in "The Sea Devils" (1997) p.90: "Magical items and spells ennable [sic] characters to survive underwater through a variety of eldritch methods." We also see it in his foreword to Combat & Tactics (1995): "swirling action, ringing steel, and eldritch flashes of magic." He or his works may have influenced the name of the class.
Monte Cook, another co-writer of the 3.0 rulebooks, used the name in his third-party Book of Eldritch Might series, again as a synonym for "arcane". We know that he was not working at WotC by the time the 3.5 DMG was written, however.
Other writers often use "eldritch" in specific reference to "eldritch fire". It's quite often used to refer to magical things found in dungeons, where it is usually something menacing or scary. Races of Faerûn (2001) has the feat Eldritch Linguist, which again is using it in its tone of simply meaning "arcane" prior to the Warlock class.
KRyan notes that in 3.5, "eldritch" is often used to refer to warlock-exclusive abilities: this is indeed often the case. This is entirely due to the warlock's Eldritch Blast ability, and other class abilities or feats which use the word eldritch because they modify Eldritch Blast.
However, the warlock does not have exclusive domain over this brand, even in the very limited context of the names of player-character abilities in D&D 3.5. The feat Eldritch Corruption (Heroes of Horror p.122) applies to any spellcaster. Eldritch Erosion (Complete Scoundrel p.77) is a feat for rogues who sneak attack enemies with spell resistance. The metamagic feats Entangling Spell and Lingering Spell (Champions of Ruin p.20) described as releasing eldritch energy, again a synonym for "arcane" without special meaning, while the same book p.139 details Prince-Consort Imbrar Heltharn, a death knight fallen paladin blackguard whose Abyssal Blast releases "eldritch fire".