Use when someone succeeds against the odds, when no one thought they would. Everyone doubted her, but she pulled it out of the bag and won the competition.
Pro Tip 2/3
Last Minute
Especially useful for describing a sudden success near the end of an event or time period. He pulled it out of the bag with only minutes left in the exam.
Pro Tip 3/3
Implies Tension
Often suggests a tense or challenging situation where the outcome was uncertain. With the deadline approaching, they pulled it out of the bag with a brilliant proposal.