Preheat and prep the dish. Heat the oven to 375°F (190°C). Butter a 2-quart baking dish (about 8x10 inches). Rub a cut clove of garlic around the dish if you like extra aroma.
Slice the potatoes evenly. Aim for 1/8 inch (3 mm) thickness so the layers cook at the same pace.
A mandoline makes this fast; a sharp knife works too. Do not soak the slices, as you want the natural starch to help thicken the sauce.
Make the cream mixture. In a small pot over low heat, warm the cream with the garlic, shallot, thyme, nutmeg, salt, and pepper for 3–5 minutes. Do not boil.
This infuses flavor and keeps the bake cohesive.
Layer the potatoes. Arrange a shingled layer of potatoes in the dish. Spoon some warm cream mixture over the top. Sprinkle a modest handful of Gruyere.
Repeat, building 3–4 layers, ending with cream. Reserve 1/3 cup Gruyere for the final topping.
Dot with butter. Scatter small pieces of butter over the top layer to encourage browning and a silky finish.
Par-bake uncovered. Bake for 35–40 minutes until the potatoes are mostly tender when pierced with a knife and the edges are bubbling. The top should look pale-golden.
Add the final cheese. Remove the dish, sprinkle the remaining Gruyere and Parmesan on top, and return to the oven for 12–15 minutes, until deep golden and crisp at the edges.
Rest before serving. Let the bake sit for 10–15 minutes.
This sets the layers and makes slicing neat and easy.
Finish and serve. Top with a few fresh thyme leaves or cracked pepper. Serve warm alongside your main.