
Pull it/something out of the bag
Unexpected Success
Use when someone succeeds against the odds, when no one thought they would. 
Last Minute
Especially useful for describing a sudden success near the end of an event or time period. 
Implies Tension
Often suggests a tense or challenging situation where the outcome was uncertain. 