A "Houdini act" means to escape a really difficult or improbable situation.
It comes from the the famous magician and escape artist who was popular turning the turn of the 19th to 20th century. His name has since become synonymous with escaping a difficult situation.
One could say, "I really had to do a Houdini act to escape that course with an A-."
There are variations on the term "Houdini act," such as "doing a Houdini."
"I went to the homecoming game and it was really exciting. On the game-winning touchdown, it looked liked our quarterback was going to be sacked. But he did a real Houdini, escaped the sack, and threw the TD pass."
See Houdini himself in action: https://www.youtube.com/watch?v=E_HHFMSmHCQ