The story
Back-formation from contraception. Attested US 1932, with earlier occasional use as abbreviation for contraceptive in the medical literature; popularized US mid-1960s in the context of the sexual revolution.
Etymology from Wiktionary, CC BY-SA 4.0.