
1. Preheat the oven to 400°F and grease a 9x13-inch baking dish.
2. Start by slicing the potatoes into ⅛-inch-thick slices. You can use a mandoline for this step, but a knife works just as well. Just be careful to slice the potatoes evenly so that they cook through at the same rate.
3. Next, make the sauce. In a medium skillet, melt the butter over medium heat. Add the flour and whisk for 1 minute, then slowly add the milk followed by the vegetable broth, whisking continuously. Add the garlic, thyme, salt, and pepper and cook, whisking often, for 2-3 minutes, or until the sauce lightly coats the back of a spoon. Remove from the heat.
4. Layer half of the potatoes at the bottom of the prepared baking dish. Top with half the onion, then half the sauce and 1 cup of the cheese. Repeat the layers with the remaining potatoes, onion, sauce, and remaining cup of cheese. Garnish with thyme.
5. Cover and bake for 30 minutes, then uncover and bake for 35-40 minutes, or until the potatoes are tender and the cheese on top is browned. Let stand at room temperature for 20 minutes before serving.
As delicious as this recipe is freshly made, it is even better leftover! To save yourself time day-of, and not lose quality, here’s how to do it: