Preheat your oven to 400°F (convection if available).
Toss the Yukon gold potatoes with olive oil and kosher salt, then arrange them in a Le Creuset skillet or any oven-safe baking dish. Bake for about 1 hour, or until fork-tender and golden on the outside.
While the potatoes bake, melt butter in a skillet over medium-low heat.
Add the sliced onions and cook slowly, stirring occasionally, until deep golden brown, about 30–40 minutes. Once caramelized, set aside.
In a saucepan, melt butter over medium heat. Add the minced garlic and cook until fragrant, about 30 seconds.
Whisk in the flour to form a roux, cooking for about 1–2 minutes until lightly golden.
Slowly pour in the milk, whisking constantly to prevent lumps. Stir in salt, pepper, and dried thyme.
Remove from heat and whisk in 4 ounces of shredded Gruyère, stirring until smooth and creamy.
Cut an “X” into the top of each baked potato. Use a fork to gently smash and fluff the insides so they fill the bottom of the skillet or baking dish.
Dot each potato with a little butter and sprinkle with salt, pepper, and thyme.
Spread the caramelized onions evenly over the top.
Pour the Gruyère white sauce over the potatoes so it coats everything and drips down the sides.
Sprinkle the remaining 4 ounces of Gruyère evenly over the top.
Place under the broiler for 4–5 minutes, or until the top is bubbly and golden brown (watch it carefully).
Let it rest for 10 minutes before serving so the sauce sets slightly. Serve and enjoy!
