To make the pastry, whisk together the flour and salt in a bowl. Using your hands or a pastry cutter, quickly work in the butter, squeezing or cutting it until the floury mixture is filled with pea-sized lumps. Drizzle the cold water over the mixture and stir together with a fork until it just holds together when squeezed.Gather the dough into a ball and flatten slightly and wrap tightly in plastic wrap. Refrigerate for at least 1 hour and up to 2 days.
While the pastry chills, make the filling. Cook the bacon in a large heavy skillet over moderate heat, stirring occasionally, until beginning to crisp, 5–8 minutes. Use a slotted spoon to transfer bacon to a paper towel–lined plate. Pour off all but 2 tablespoons fat from the skillet.
While the bacon cooks, thinly slice the white and pale green parts of the leeks (discard the tough, dark-green leaves) and rinse well to remove any dirt and grit. Add the leeks to the fat remaining in the skillet and cook over moderate heat, stirring occasionally, until wilted and tender, 5 to 7 minutes. Remove from heat and season with ¼ teaspoon each salt and pepper. Let cool.
When ready to bake, preheat oven to 375°F. Line a baking sheet with parchment paper.
Stir together the cooled leeks, crème fraîche, shredded gouda and bacon.
Roll out the dough on a lightly floured work surface into a large circle about ⅛-inch thick. Carefully transfer dough to the lined baking sheet. Spread the filling over the center of dough so that it is about 1-inch thick. Fold edges of dough up over the sides of the filling to contain it, pleating as necessary, leaving the center uncovered.
Bake until pastry is crisp and golden brown, about 40 minutes. Let cool for about 10 minutes before cutting into wedges and serving.