"machine for separating cotton from seeds," 1796, Amer.Eng., used earlier of various other machineries, from M.E. gin "ingenious device, contrivance" (c.1200), from O.Fr. gin "machine, device, scheme," aphetic form of engin, from L. ingenium (see engine
mid-14c., gunne "an engine of war that throws rocks, arrows or other missiles," probably a shortening of woman's name Gunilda, found in M.E. gonnilde "cannon" and in an Anglo-L. reference to a specific gun from a 1330 munitions inventory of Windsor Castle ("...una magna balista de cornu quae Domina Gunilda
..."), from O.N. Gunnhildr, woman's name (from gunnr + hildr, both meaning "war, battle"); the identification of women with powerful weapons is common historically (cf. Big Bertha, Brown Bess, etc.); meaning shifted with technology, from cannons to firearms as they developed 15c. Great guns (cannon, etc.) distinguished from small guns (such as muskets) from c.1400. First applied to pistols and revolvers 1744. Meaning "thief, rascal" is from 1858. The verb meaning "to shoot with a gun" is from 1620s; the sense of "to accelerate an engine" is from 1930. Gun-shy is 1884, originally of sporting dogs. Son of a gun is originally nautical. Gun-metal (commonly an alloy of copper and zinc) used attributively of a dull blue-gray color since 1905. Gunboat is from 1793; gunboat diplomacy is from 1927, originally with reference to China.
in slang phrase gin up "enliven, make more exciting," 1887, probably from earlier ginger up in same sense, from ginger
in sense of "spice, pizzazz;" specifically in ref. to the treatment described in the 1811 slang dictionary under the entry for feague:
... to put ginger up a horse's fundament, and formerly, as it is said, a live eel, to make him lively and carry his tail well; it is said, a forfeit is incurred by any horse-dealer's servant, who shall shew a horse without first feaguing him. Feague is used, figuratively, for encouraging or spiriting one up.