While there's no definitive recipe for the origins of the Internet cookie, we can piece together some likely ingredients to get a pretty good idea of the word's source.
The most common explanation suggests the term comes from Unix. In Unix, a "magic cookie" refers to a chunk of data that's passed between two programs. See the resemblance?
As for how the word "cookie" originally came to be, that answer's a little more murky. Some have pointed to the notion of leaving tiny crumbs behind; others tie the term to the fortune cookie and its use of an embedded message within a neatly wrapped package.
JR Raphael is a syndicated writer and cookie connoisseur (he prefers snickerdoodles over the digital variety). Follow him on Google+ or Twitter for more freshly baked tech musings.