"sideshow freak," 1916, U.S. carnival and circus slang, perhaps a variant of geck "a fool, dupe, simpleton" (1510s), apparently from Dutch gek or Low German geck, from an imitative verb found in North Sea Germanic and Scandinavian meaning "to croak, cackle," and also "to mock, cheat" (Dutch gekken, German gecken, Danish gjække, Swedish gäcka). The modern form and the popular use with reference to circus sideshow "wild men" is from 1946, in William Lindsay Gresham's novel "Nightmare Alley" (made into a film in 1947 starring Tyrone Power).
"An ordinary geek doesn't actually eat snakes, just bites off chunks of 'em, chicken heads and rats." [Arthur H. Lewis, "Carnival," 1970]
By c. 1983, used in teenager slang in reference to peers who lacked social graces but were obsessed with new technology and computers (such as the Anthony Michael Hall character in 1984's "Sixteen Candles").
geek out vi. To temporarily enter techno-nerd mode while in a non-hackish context, for example at parties held near computer equipment. [Eric S. Raymond, "The New Hacker's Dictionary," 1996]