Whisk together the flour, sugar, and salt in a large bowl.
Add the cold butter cubes and use a pastry cutter or your fingertips to work them into the flour until the mixture resembles coarse crumbs with pea-sized butter pieces still visible.
Pour in 3 tablespoons of ice water and gently mix with a fork until the dough begins to come together. Add the remaining tablespoon of water if needed.
Form the dough into a disk, wrap in plastic, and refrigerate for at least 15 minutes.
While the dough chills, core your apples and slice them thinly (about 1/8-inch thick). In a medium bowl, toss the apple slices with lemon juice to prevent browning.
In a separate bowl, combine the shredded Gouda, thyme leaves, honey or maple syrup, flour, pepper, and salt.
Preheat your oven to 375°F (190°C) and line a baking sheet with parchment paper.
Remove the dough from the refrigerator and roll it out on a lightly floured surface into a roughly 12-inch circle.
Transfer the dough to the prepared baking sheet. Sprinkle half of the cheese mixture over the center, leaving a 2-inch border all around.
Arrange the apple slices in an overlapping pattern over the cheese, then sprinkle with the remaining cheese mixture. Dot the filling with small pieces of butter.
Gently fold the edges of the dough over the filling, pleating as you go around.
Brush the exposed dough with beaten egg for a golden finish, and if desired, sprinkle with a pinch of coarse sugar.
Bake for 35-40 minutes, until the crust is golden brown and the filling is bubbling.
Allow the galette to cool for 10-15 minutes before slicing to let the filling set properly.