Use a mandoline to make thin, even potato slices.
- 2 tablespoons unsalted butter, plus more for dish
- 1 medium onion, cut into 1/2-inch dice
- 2 pounds assorted wild mushrooms, such as chanterelle, oyster, or black trumpet, coarsely chopped
- 1/4 cup dry white wine, such as Sauvignon Blanc
- 1 1/2 teaspoons coarse salt
- Freshly ground pepper
- 1 cup finely grated Gruyere cheese (about 4 ounces)
- 1 cup finely grated Parmesan cheese, about 3 1/2 ounces
- 2 pounds Yukon Gold potatoes, peeled and cut into 1/8-inch-thick rounds
- 1 tablespoon finely chopped thyme leaves
- 3/4 cup whole milk
- 1/2 cup heavy cream
Preheat oven to 350 degrees. Butter a 13-by-9-inch baking dish; set aside. Melt butter in a large skillet over medium heat. Add onion; cook, stirring occasionally, until softened, about 5 minutes. Add half of the mushrooms; cook until they are slightly softened. Add remaining mushrooms; cook, stirring occasionally, until mushrooms have released their juices and most of the liquid has evaporated, 8 to 10 minutes. Add wine; cook, stirring occasionally, until liquid has evaporated, 3 to 5 minutes. Remove from heat. Season with salt and pepper.
Combine cheeses in a small bowl; set aside. Cover bottom of prepared dish with potato slices, slightly overlapping them. Sprinkle with half of the thyme and a pinch each of salt and pepper. Sprinkle with 1/3 of the cheese and half of the mushroom mixture. Repeat layering process, using all but 2 tablespoons cheese. Arrange remaining potato slices, slightly overlapping, around the edge of the dish. Stir together milk and cream in a bowl, and pour over top. At this point, dish can be refrigerated, covered, up to 1 day; let stand at room temperature 30 minutes before baking.
Cover loosely with foil, and bake until bubbling, about 1 hour. Remove foil, and sprinkle with reserved cheese. Bake until top is golden, 20 to 30 minutes more. Transfer dish to a wire rack; let cool 10 minutes before serving.