1837, slang, something that "settles" a debate, discussion, conflict, etc.; hence "something astonishing" (1880s). Probably an agent noun from cork (v.) on the notion is of putting a cork in a bottle as an act of finality.
A person or thing that is remarkable, wonderful, superior, etc; humdinger, piss-cutter: What a corker, this guy
[1882+; fr earlier sense ''something that definitively settles a matter,'' perhaps fr caulk]