Pull it/something out of the bag informal verb phrase
Peter still managed to pull victory out of the bag.
We all want Stacy to pull it out of the bag and win the race.
To punish someone or something harshly
This idiom is often used to express that you should accept an unpleasant situation or event because you cannot change it.
Once something has been done, you can do nothing but face the consequences.
The verb "pull" should be conjugated according to its tense.
(Image Source: The Irish Times)
The idiom is believed to relate to the situation where a team saves the game by winning in a surprising way.