From Wikipedia:

The word geek is a slang term, noting individuals as “a peculiar or otherwise odd person, especially one who is perceived to be overly obsessed with one or more things including those of intellectuality, electronics, gaming, etc.”[1] Formerly, the term referred to a carnival performer often billed as a wild man whose act usually includes biting the head off a live chicken, bat, snake or bugs. The 1976 edition of the American Heritage Dictionary included only the definition regarding geek shows.

This word comes from English dialect geek, geck: fool, freak; from Low German geck, from Middle Low German. The root geck still survives in Dutch gek: crazy, and in the Alsatian word Gickeleshut: geek’s hat, used in carnivals[2].