Preheat the oven to 350 degrees F. Lightly butter a 3-quart flameproof baking dish. Bring a large pot of salted water to a boil; add the potatoes and cook until just tender, 8 to 10 minutes. Drain the potatoes and return to the pot.
Meanwhile, melt 2 tablespoons butter in a saucepan over medium heat. Stir in the flour with a wooden spoon to make a paste. Cook, stirring, until the paste puffs slightly, about 1 minute. Gradually whisk in both milks and simmer, whisking constantly, until thickened, about 3 minutes. Remove from the heat and whisk in 1/2 teaspoon pepper, 1 1/2 teaspoons salt and the nutmeg. Pour the sauce over the potatoes and gently toss to coat.
Transfer the potato mixture to the prepared baking dish and sprinkle with the gruyere. Bake until heated through, about 10 minutes. Switch the oven to the broiler setting and broil the potatoes until browned on top, about 5 minutes. Let rest 10 minutes before serving.