Can imply different things based on the speaker's tone and context; may be positive or negative. You forgot your anniversary again? You really take the cake!
Pro Tip 2/3
Not Literal
It's a figurative phrase and doesn't involve an actual cake. His excuse for being late really took the cake.
Pro Tip 3/3
Colloquial
Best used in informal conversations among friends or in casual settings. Of all her performances, this one takes the cake!