Take the cake
Carry off the honours. Sometimes used to express incredulity; for example, "That's three goals he's missed in one game. If that don't take the cake...".
It is widely supposed that this phrase originated with cake-walk strutting competitions, which were commonplace in the black community of the southern USA in the 19th and early 20th centuries. In those, couples would be judged on their style in the 'cake-walk'. The winners were said to have 'taken the cake', which was often the prize. This is recorded in US newspapers from around the 1870 onwards; for example, The Indiana Progress, January 1874 has:
"The cake-walk, in which ten couple [sic] participated, came off on Friday night, and the judges awarded the cake, which was a very beautiful and costly one, to Mrs Sarah and John Jackson."
The phrase is much earlier than that though. As early as the 5th century BC the Greeks used 'take the cake' as symbolic of a prize for a victory. In 420 BC the Greek Aristophanes wrote 'The Knights', which was a criticism of the powerful Athenian politician Cleon:
"If you surpass him in impudence the cake is ours."
Clearly, that phrase would have entered into English in translation, and although it may have been long used in Greece, there's no evidence of any take up of it in English prior to the 19th century US usage.
In the US the phrase is sometimes given as 'take the cakes', although the singular is used elsewhere in the English-speaking world. That version is the earliest citation in print in English. William Trotter Porter's 1847 work 'A Quarter Race in Kentucky' has:
"They got up a horse and fifty dollars in money a side, ... each one to start and ride his own horse, ... the winning horse take the cakes."
The related phrase 'take the biscuit' means virtually the same, although is more often associated with surprise at a particular outcome than with victory in some enterprise.
See other phrases that were coined in the USA.