The phrase
"sting in the tail" means that something unpleasant or unexpected is about to happen at the end of a situation or event. It refers to a surprising twist or final blow that can ruin an otherwise positive or smooth experience.
Full definition