At the beginning of the story, the protagonist attempts to demonstrate a skill, and fails dismally. This is a sure sign that at the climax they're going to save the day by attempting this skill again and getting it right (usually for the first time ever).
A sister trope of Chekhov's Skill and Chekhov's Hobby, in which the protagonist mentions or demonstrates that they can do something which will turn out to be valuable later. Crisis Makes Perfect is when the protagonist demonstrates that they can't do something right up until everything depends on them being able to.
Compare Becoming the Boast, where a character who has been boasting about their ability all story is called on to demonstrate it, admits they can't, and then has to do it anyway; Die or Fly, where a crisis brings out a previously-unsuspected ability; and One Bullet Left, another trope demonstrating that the hero can do amazing things when the climax of the story depends on it.
FLCL episode 4 "Full Swing". Naota is so bad at swinging a baseball bat that he refuses to swing during games. At the end of the episode he swings a guitar perfectly to stop a falling satellite bomb in its tracks.
In Naruto, Naruto is given a week to learn Rasengan. He doesn't manage it until the last day, when Kabuto is about to kill Tsunade and the only move Naruto knows that will put Kabuto out of the fight is Rasengan.
Film — Animated
In Happily Ever After, Thunderella has trouble focusing her storm-control powers. In the climax, she successfully throws a lightning bolt at the villain, which creates a distraction for Snow White to deal the final blow.
The opening of How to Train Your Dragon 2 has Hiccup and his dragon Toothless practice rider-less flying combined with squirrel-suit flying, a difficult task for both of them because Toothless can't make tight turns without a rider to control his prosthetic tail fin and because Hiccup can't gain altitude, only glide. The climax relies on the two of them both pulling off these tricks again, aided by Toothless' discovery of stabilizing back spines to let him turn sharper even with a stiff tail fin.
In the The Hunchback of Notre Dame sequel, Madellaine struggles with her ambition to become a tightrope walker. At the end, she pulls it off to save Zephyr.
In The Tigger Movie, Tigger shows Roo the Whoopty-Dooper Loopty Looper Alley Ooper bounce. Roo can't do it at first, nor later when he's practicing before bedtime. At the end, he has to do it to save Tigger from an avalanche.
Film — Live Action
In Down Periscope, the diving officer screws up her maneuvering early in the film, but then in the crucial moment near the end gets it exactly right thanks to the captain Obfuscating Stupidity and giving incorrect orders to induce her to jump in with the correct ones.
In the climactic game of Major League, veteran pitcher Eddie Harris is flagging at the top of the ninth inning, when Yankees power hitter Clu Haywood comes up to bat. The Indians' manager calls Ricky "Wild Thing" Vaughn in as relief pitcher, even though Vaughn has never failed to give away a hit to Haywood in the season. The catcher protests, but the Indians' manager insists, saying, "I've got a hunch he's due." Vaughn throws three straight fastballs and strikes Haywood out.
In Maverick, Maverick has a superstition about being able to draw exactly the card he needs, which fails every time he tries it except during the climactic poker game with everything riding on it.
A running gag in One Crazy Summer has Hoops repeatedly failing to make improvised basketball shots (wastebasket, trash can, Ack-Ack). During the boat race, one of the villains cheats by using a sniper rifle to shoot out the line for their sail. Unfortunately, they have to repair it by putting the line back through the halyard hole and they don't have the equipment to do so. Their solution: tie the line to a metal ball and have Hoops throw that through the hole. Somehow, he makes it. Even he is surprised.
In Santa Claus The Movie, Santa attempts to show Joe the Super Duper Looper maneuver he's been trying to teach his reindeer, but Donner's acrophobia forces the reindeer to abort it. At the climax of the movie, when Santa has to save Patch and Joe from an endangered Patchmobile, he is forced the perform the Super Duper Looper in order catch them, shouting encouraging words to Donner. The Super Duper Looper is performed flawlessly, and Patch and Joe are rescued.
In Shanghai Noon, Owen Wilson's character is shown to be a terrible shot. When it comes to the final shootout, however, he manages to put his only remaining bullet through his opponent's heart. It's hard to tell who's more surprised by this.
In Space Camp, the pilot trainee is unable to recover from a spin in the simulator. After being inadvertently launched into space, she finds herself having to do it for real.
A Running Gag in Steel is John Henry Irons (Shaquille O'Neal) not being able to make basketball shots. Then he successfully lobs a grenade through a vent in a very similar way to save lives.
In Willow, Willow attempts to perform a disappearing trick and it goes disastrously wrong. At the climax, he foils the evil sorceress by successfully vanishing the MacGuffin.
Mole's catchphrase in the film version of The Wind in the Willows is "But I can't throw for toffee!" But near the end he manages to literally throw a spanner into the works of the Weasels' dogfood machine.
In The First Law, there's a couple of scenes where Nicomo Cosca, an infamous mercenary turned seedy drunk tries to do a knife throwing trick where he points out a target and says he will hit it. Inevitably, the knife hits way off course, which doesn't exactly instill confidence in his allies. However, in a climatic fight, he actually succeeds in doing the trick and hits an opponent right between the eyes.
In Chuck season 3 when he was training to be a "real" spy, Chuck had to do an Improvised Zipline using a power line and his belt as the pulley, but failed. Then at the end of the ep in a real situation he was forced to use a power line as a zip line with his belt as the pulley. This time he succeeded.
In Fringe, a villain threatens a biological attack unless Olivia can make a box of lights switch off with her mind. Fringe Division assumes he's mad, and prepares a rigged box to fake the effect - but the episode ends with Olivia having to use her latent mental powers to switch off another box, wired directly to the bomb that will release the contaminant. She succeeds.
In the DuckTales episode "Top Duck", Launchpad (unsurprisingly) crashes spectacularly the first time he attempts the "Treetop Bebop Tuck and Roll". At the episode's end, he manages it to save Scrooge and the Money Bin.
In The Legend of Korra, Korra manages to get a grip on the Airbending stance she struggled with earlier just in time to turn around her Pro-Bending match.
In "Sonic Rainboom", Rainbow Dash struggles to pull off the title maneuver while practicing for a flight competition. Come the day of the competition, she pulls it off to save Rarity and several Wonderbolts from falling to their deaths.
In "Hurricane Fluttershy", Rainbow Dash sets the goal for every pegasus to achieve 10.0 wingpower so they can make a tornado and lift water to Cloudsdale. Fluttershy initially gets 0.5 wingpower, and trains to get up to 2.3 wingpower. When the pegasi try to create the tornado, they don't have enough wingpower to lift the water, so Fluttershy joins and manages to fly faster than she ever did before.
In Regular Show, season 5 "Dodge This", when the park workers form a dodge ball team, Rigby practices his dodge ball throw, the "Rignado", but he can't aim it properly. When his team is against "The Magical Elements" and Rigby and Reginald, one of the giant flying babies, are the only ones remaining, Rigby does the "Rignado" again but this time it hits his opponent and his team moves on to the finals.
(old title ideas: "But That Trick Never Works", "Crisis Creates Competence")
Five hats means that five tropers think it is ready to publish.
You are saying that you think this draft is ready to be published. That means the description is not ambiguous,
it doesn't duplicate an existing trope, there are at least three examples, and the title makes sense.
Is that what you meant to do?
You are saying this draft has a ready-to-publish hat it does not deserve and you are taking it back.