These creamy au gratin potatoes layer thinly sliced Yukon Golds and tender leeks with Gruyère, Parmesan, and fragrant garlic-thyme cream. Baked until bubbling and golden, this comforting, make-ahead-friendly side dish is perfect for holidays and special dinners.
Preheat the oven to 400°F and position a rack in the center. Generously butter the base and sides of a 9×13-inch baking dish or 4-quart casserole dish; set aside.
Combine the heavy cream, garlic, and thyme in a small saucepan. Bring to a gentle simmer over medium heat and cook for 4–5 minutes, just until fragrant. Remove from the heat and let the mixture steep while you prepare the other ingredients.
Slice the potatoes about ⅛ inch thick using a mandoline or sharp knife. Trim, clean, and thinly slice the leeks.
In a large bowl, combine the potatoes, leeks, shredded cheese, and ½ cup of the Parmesan. Season with a scant 1 teaspoon kosher salt and a few twists of black pepper. Pour the warm thyme cream over the mixture and toss well, separating any potato slices that stick together so everything is evenly coated.
Transfer the mixture to the prepared baking dish, arranging it in even layers and finishing with a layer of potatoes on top. Spoon any remaining cream from the bowl over the gratin. Wipe any drips from the sides of the pan to prevent them from burning.
Cover the dish tightly with foil and bake for 60 minutes.
Remove the foil and sprinkle the remaining ¾ cup Parmesan over the top. Return the dish to the oven and bake uncovered for 20–30 minutes, until the top is golden brown and the potatoes are tender when pierced with a fork.
Let the gratin cool for 10–15 minutes so the cream can begin to set. Serve warm.