Basically, the boat has to be the the stalled configuration BEFORE the gust.
Racing, judge how SLOW you want to go compared to other boats, vs how much you want to stall BEFORE the gust. The more you stall the sails out BEFORE the gust, the better your chances. Obviously, to speed up you begin to let the sails out.
I and a couple others did this in the "round the island" race, Fort Walton to Pensacola and back, a few years ago and weather charts recorded the storm had winds up to 40. Yes, I had to yell at the crew for an extended period of time before he relented and pulled the traveler in. We had a good laugh afterwards once the storm over, on that issue.