2 tablespoons unsalted butter, more for greasing the pan
2 large leeks, trimmed and halved lengthwise
1 ½ pounds peeled Yukon Gold potatoes
1 teaspoon kosher salt
½ teaspoon ground black pepper
2 thyme sprigs
1 cup heavy cream
1 fat garlic clove, finely chopped
1 bay leaf
¼ teaspoon freshly ground nutmeg
¾ cup Gruyère, grated
Heat oven to 350 degrees and butter a 2-quart gratin dish. Wash the leeks to remove any grit and slice thinly crosswise.
Using a mandoline or sharp knife, slice the potatoes into rounds, 1/8-inch thick. Toss with 3/4 teaspoon salt and 1/4 teaspoon pepper. Layer the rounds in the gratin dish.
Melt the 2 tablespoons butter in a large skillet over medium heat. Add leeks, remaining salt and pepper, and thyme. Cook, stirring, until leeks are tender and golden, 5 to 7 minutes. Discard thyme and scatter the leeks over the potatoes.
Add cream, garlic and bay leaf to the skillet, scraping up browned bits of leeks from the bottom of the pan. Simmer gently for 5 minutes. Stir in nutmeg.
Pour the cream over the leeks and potatoes and top with the Gruyère. Cover with aluminum foil and transfer to the oven. Bake for 40 minutes, uncover and bake until the cheese is bubbling and golden, 15 to 20 minutes longer. Let cool slightly before serving.