1540s, "to strike hard with a loud blow," from O.N. banga "to pound, hammer" of echoic origin. Slang meaning "have sexual intercourse with" first recorded 1937. Bang-up "excellent, first-rate," 1820, probably shortened from phrase bang up to the mark.
"This is the way the world ends Not with a bang but a whimper"