
Layered with Gruyère and Parmesan, a bubbling dish of this rich and creamy potatoes au gratin will truly stop the show.
In a large pot over medium-high heat, bring shallot, garlic, cream, milk, and thyme sprigs to a simmer. Remove from heat, cover, and let steep 30 minutes.
Meanwhile, arrange a rack in center of oven; preheat to 350°. Grease a 13" x 9" baking dish with butter. Peel and slice potatoes into 1/8"-thick slices (a small handheld mandoline works well for this).
Strain cream mixture through a fine-mesh sieve into a large bowl, then return to pot; discard solids. Stir in salt, then add potatoes. Bring to a simmer and cook over medium-high heat, stirring occasionally, until just tender, 4 to 5 minutes.
Pour one-third of potato mixture into prepared dish. Top with one-third of Gruyère and one-third of Parmesan. Sprinkle with 1/2 tsp. thyme leaves. Repeat the layers once more. Finish by topping with remaining potato mixture (making sure to add all the cream), Gruyère, and Parmesan; reserve remaining 1/2 tsp. thyme.
Bake potato gratin until golden brown on top and bubbling, 40 to 50 minutes. Top with reserved thyme.