The story
Walk is an old native word. Its Old English ancestors, wealcan and wealcian, meant "to roll, to toss, to move around" — the sense of going on foot came later. In Middle English the word was written walk, walke or walken, and the L was pronounced.
Then a change hit a whole group of words. Before a K, the vowel in -alk developed into a diphthong (roughly "ow"), the L weakened, and in most accents it eventually disappeared altogether. The same thing happened to talk, chalk and stalk, and before an -olk to folk and yolk.
So the L in walk is a genuine fossil: it was there in the sound, the sound wore away, and the spelling kept a record of it. That is the opposite of could, whose L was never pronounced at all.
