The story
Knife is younger than most of the silent-K words. It appears in late Old English as cnīf, and it most likely came from Old Norse knífr — one of many everyday words the Viking settlers gave to English, alongside knife's neighbors egg, skin and window.
Two things have happened to it since. First, the K was pronounced, as it was in every kn- word: cnīf began with "k-n". Educated speech dropped that K in the 1600s. Second, the vowel moved. The ī was a long "ee", so the word sounded like "k-NEEF". The Great Vowel Shift (roughly 1400-1600) turned long "ee" into the "eye" diphthong, giving modern NIFE.
The spelling preserves both stages of the past: a K nobody says and an I that no longer sounds like "ee".
