"cylindrical vessel or cask, generally bulging in the middle and made of wooden staves bound by hoops," c. 1300, from Old French baril "barrel, cask, vat" (12c.), with cognates in all Romance languages (Italian barile, Spanish barril, etc.), but of unknown origin. Also a measure of capacity of varying quantity. Meaning "metal tube of a gun" is from 1640s. Barrel-roll (n.) in aeronautics is from 1920. To be over a barrel figuratively, "in a helpless or vulnerable condition," is by 1914 and might suggest corporal punishment.
mid-15c., "to put in barrels," from barrel (n.). Meaning "to move quickly" is 1930, American English slang, perhaps suggestive of a rolling barrel. Related: Barreled; barreling.