6 to 8 servings
Preheat the oven to 350 degrees F. Rub a 12-inch gratin dish or shallow 3-quart baking dish with the garlic. Let dry, then coat with the butter.
Combine potatoes, milk/half-and-half, salt, pepper, and nutmeg in a large saucepan or Dutch oven. Bring the mixture to a gentle boil over medium heat, then cook and stir until the liquid thickens slightly, about 5 minutes. Pour the mixture into the prepared dish. Press down on the top layer to submerge the potatoes. Sprinkle with the cheese. Bake until the top is golden and the potatoes are very tender, 45 minutes to 1 hour.