Preheat the oven to 400 degrees F. Spray a 2.5 or 3 quart casserole pan with a non-stick cooking spray.
Layer the potatoes and sliced onions into the casserole dish. You want to make slanted rows and layer the sliced potatoes on top of each, leaving room in between so the sauce can get into between the potatoes.
Melt the butter in a medium saucepan over medium high heat. Add the flour and stir until combined. Then whisk in the milk, garlic powder, salt and pepper. Cook for 2-3 minutes whisking continuously until the mixture thickens.
Then remove the saucepan from the heat and then immediately stir in the shredded cheeses.
Pour the cheese sauce even over the potatoes in the casserole dish making sure that they are all covered with the cheese sauce.
Cover the casserole dish with foil and bake for 60 minutes. Then remove the foil and bake for 20-30 minutes until the top of the potatoes are browned and the potatoes are fork tender.
Let the potatoes sit for 20-30 minutes before serving. Then top with the fresh parsley and it’s ready to enjoy!
Notes
Use freshly shredded cheeses so that it melts smoothly and evenly in this recipe. Try to slice the potatoes as even as possible so that they cook at approximately the same time (the thinner the better). If you cannot find Gruyere Cheese, you can use mozzarella cheese instead. Refrigerate any leftovers in an airtight container for up to 5 days.