Old English cnocian (West Saxon cnucian), "to pound, beat; knock (on a door)," likely of imitative origin. Figurative meaning "deprecate, put down" is from 1892. Related: Knocked; knocking. Of engines from 1869. To knock back (a drink) "swallow quickly or at a gulp" is from 1931. Many phrases are in reference to the auctioneer's hammer, for example knock down (v.) "dispose of (something) at auction" (1760).
mid-14c., from knock (v.). As an engine noise, from 1899.