mid-14c., "flat part of a hinge" (now obsolete), probably from Old English -twist "divided object; fork; rope" (as in mæsttwist "mast rope, stay;" candeltwist "wick"), from Proto-Germanic *twis-, from PIE root *dwo- "two." Original senses suggest "dividing in two" (source also of cognate Old Norse tvistra "to divide, separate," Gothic twis- "in two, asunder," Dutch twist, German zwist "quarrel, discord," though these senses have no equivalent in English), but later ones are of "combining two into one," hence the original sense of the word may be "rope made of two strands."
Meaning "thread or cord composed of two or more fibers" is recorded from 1550s. Meaning "act or action of turning on an axis" is attested from 1570s. Sense of "beverage consisting of two or more liquors" is first attested c. 1700. Meaning "thick cord of tobacco" is from 1791. Meaning "curled piece of lemon, etc., used to flavor a drink" is recorded from 1958. Sense of "unexpected plot development" is from 1941.
The popular rock 'n' roll dance craze is from 1961, so called from the motion involved, but twist was used to describe popular dances in 1894 and again in the 1920s. To get one's knickers in a twist "be unduly agitated" is British slang first attested 1971.