Preheat your oven to 350°F. Grease a 9×9-inch (or 2-quart) baking dish with cooking spray and set it aside.
Peel, wash, and thinly slice the gold potatoes into ⅛-inch rounds using a mandoline or sharp knife.
In a large pot, melt the butter over medium heat. Whisk in the flour, garlic powder, onion powder, salt, and pepper. Cook this mixture, whisking constantly, for about 1 minute until it’s bubbly.
Gradually whisk in the milk, a little at a time, ensuring there are no lumps. Keep whisking until the sauce thickens enough to coat the back of a spoon, which should take around 4 to 6 minutes.
Remove the pot from heat. Slowly stir in 1-1/2 cups of sharp Cheddar and 1/4 cup of Parmesan, adding a small handful at a time. Stir gently after each addition until the cheese is completely melted and the sauce is smooth.
Add the sliced potatoes to the cheese sauce. Using a rubber spatula, gently toss to coat the potato slices evenly without breaking them.
Pour the mixture into the prepared baking dish and smooth it into an even layer.
Cover the dish tightly with foil and bake for 1 hour and 15 minutes, or until the potatoes are fork-tender.
After the potatoes are tender, remove the foil and sprinkle the remaining Cheddar and Parmesan evenly over the top.
Return the dish to the oven, uncovered, for an additional 15 to 20 minutes, or until the top is golden and bubbling.