In a large bowl, whisk together flour, salt, and sugar.
Using a pastry cutter or food processor, cut the cold butter into the flour mixture until it resembles coarse crumbs with some pea-sized pieces remaining.
Drizzle in ice water, 1 tablespoon at a time, mixing gently after each addition until the dough begins to come together.
Divide the dough into two equal portions and shape each into a disk. Wrap in plastic wrap and refrigerate for at least 1 hour.
Rinse gooseberries thoroughly and remove any stems or tails. Cut large berries in half if desired.
In a large bowl, gently toss the gooseberries with sugar, cornstarch, lemon juice, vanilla extract, and salt until evenly coated.
Allow the mixture to sit for about 15 minutes to draw out juices and dissolve sugar.
Preheat oven to 425°F (220°C) and position a rack in the lower third of the oven.
On a floured surface, roll out one disk of dough to a 12-inch circle and transfer to a 9-inch pie dish.
Pour the gooseberry filling into the crust, including accumulated juices. Dot the top with small butter pieces.
Roll out the second disk of dough for the top crust. Either cover completely (cutting vents), create a lattice pattern, or use decorative cutouts.
Trim excess dough, fold edges under, and crimp decoratively.
Brush the top crust with beaten egg and sprinkle with coarse sugar if desired.
Place the pie on a baking sheet and bake at 425°F for 20 minutes. Then reduce temperature to 375°F (190°C) and continue baking for 35-40 minutes, until golden brown and bubbling.
Allow the pie to cool on a wire rack for at least 2 hours before slicing.