Guile arrived in English in the mid-1100s from Old French guile, "deceit, trickery, ruse," and carries the gu- spelling French used to keep a g hard. As with guard, guest and guide, the letter u here is a piece of French orthographic engineering rather than anything you can hear.
The French word is probably from Frankish or another Germanic source, from a root that produced Old Frisian wigila, "sorcery, witchcraft," and — surprisingly — Gothic weihs, "holy," and German weihen, "to consecrate." The Indo-European root behind them all meant something like "consecrated." The path from holy to sorcery to mere trickery is a familiar one: the vocabulary of another people's religion tends to end up as your vocabulary for deception. English wile is probably the same word arriving separately.
guile (n.) mid-12c., from Old French guile "deceit, wile, fraud, ruse, trickery," probably from Frankish *wigila "trick, ruse" or a related Germanic source; according to Watkins, from Proto-Germanic *wih-l- (source also of Old Frisian wigila "sorcery, witchcraft," Old English wig "idol," Gothic weihs "holy," German weihen "consecrate"), from PIE root *weik- (2) "consecrated, holy." also from mid-12c.
guile came in through Norman French, and its spelling follows that family's conventions.
How that family writes these sounds
| hard /g/ before e or i | gu-, with a u wedged in to keep the g hardguard, guest, guide, guile |
What gives it away on the page
| gu- | A u inserted to keep the g hard before a front vowel.guard, guest, guide, guile |
Norman French in the spelling guide · guess another word's family