Preheat oven to 350º F and prepare a 12 inch cast iron skillet with cooking spray or rub with oil if needed.
Melt the 5 tablespoons butter in the cast iron skillet over medium heat, add in the 1/2 cup yellow onion and cook until soft. Stir in the minced 3 garlic cloves and cook for 30 seconds.
Season with 1 1/2 teaspoons sea salt, 1 teaspoon black pepper, and 2 teaspoons fresh thyme leaves. Add in the 4 tablespoons all purpose flour and stir until the onions are coated in flour and a paste like mixture is formed.
Pour in the 4 cups milk and continue to cook over medium high heat, stirring constantly until the sauce thickens. Remove from the heat and add in 1 cup of the Swiss cheese and 1/4 cup of the parmesan cheese, stir until melted.
Place the sliced 6-7 Yukon gold potatoes around the outside and in the center of the sauce spooning extra sauce over the top as needed. Make sure the sauce is not too hot before touching.
Cover the pan with foil and bake for 55 minutes. Uncover and sprinkle the remaining Swiss and parmesan cheese on top. Continue to cook an additional 20-25 minutes until golden brown and bubbly.
Allow to rest for 10 minutes before serving.
Notes
Nutrition facts are just an estimate of the ingredients listed in the recipe.
The sauce can be prepared separately and then poured over the potatoes in the pan.
This can be baked in a 9 x 13 inch baking dish if you do not own a cast iron skillet.
1 tablespoon dried thyme can be used in the place of fresh thyme.
The sauce can be made in a separate pan, then poured over the potatoes in the skillet.