cap (n.) Look up cap at Dictionary.com
late Old English cæppe "hood, head-covering, cape," from Late Latin cappa "a cape, hooded cloak" (source of Spanish capa, Old North French cape, French chape), possibly a shortened from capitulare "headdress," from Latin caput "head" (see head (n.)).

Meaning "women's head covering" is early 13c. in English; extended to men late 14c. Figurative thinking cap is from 1839 (considering cap is 1650s). Of cap-like coverings on the ends of anything (such as hub-cap) from mid-15c. Meaning "contraceptive device" is first recorded 1916. That of "cap-shaped piece of copper lined with gunpowder and used to ignite a firearm" is c.1826; extended to paper version used in toy pistols, 1872 (cap-pistol is from 1879).

The Late Latin word apparently originally meant "a woman's head-covering," but the sense was transferred to "hood of a cloak," then to "cloak" itself, though the various senses co-existed. Old English took in two forms of the Late Latin word, one meaning "head-covering," the other "ecclesiastical dress" (see cape (n.1)). In most Romance languages, a diminutive of Late Latin cappa has become the usual word for "head-covering" (such as French chapeau).
cap (v.) Look up cap at Dictionary.com
c.1400, "to put a cap on," from cap (n.). Meaning "cover as with s cap" is from c.1600. Figurative sense of "go one better" is from 1580s. Related: Capped; capping.