"contrivance for catching unawares," late Old English træppe, treppe "snare, trap," from Proto-Germanic *trep- (source also of Middle Dutch trappe "trap, snare"), related to Germanic words for "stair, step, tread" (Middle Dutch, Middle Low German trappe, treppe, German Treppe "step, stair," English tread (v.)), and probably literally "that on or into which one steps," from PIE *dreb-, extended form of root *der- (1), an assumed base of words meaning "to run, walk, step." Probably akin to Old French trape, Spanish trampa "trap, pit, snare," but the exact relationship is uncertain.
Sense of "deceitful practice, device or contrivance to betray one" is first recorded c. 1400. Meaning "U-shaped section of a drain pipe" is from 1833. Slang meaning "mouth" is from 1776. Speed trap recorded from 1908. Trap-door "door in a floor or ceiling" (often hidden and leading to a passageway or secret place) is attested from late 14c. (trappe-dore).