Heat the oven to 170c. Rub a gratin dish with the butter. Peel the potatoes and slice them thinly, either with a sharp knife or a mandolin. Cut the outer layer off the celeriac and slice this thinly, too. Peel, quarter and core the pears, and slice each quarter thinly lengthwise. Combine the vegetables and pear in a bowl, season and toss. Arrange the mixture in the gratin dish, pressing it as flat as possible so there are not too many gaps and air pockets.
Put the cream and milk in a saucepan with the garlic halves, the bay leaf, the nutmeg and plenty of salt and pepper, and heat until just below boiling. Pour over the veg in the dish (take the bay leaf out at this stage, but keep the garlic in). Bake for 1.5 hours. The gratin is ready when the top is golden and bubbling, and a small, sharp knife easily pierces the vegetables all the way through. You may want to turn up the heat to 190-200C (gas mark 5 or 6) for five minutes at the end for a bit of extra bubbling crispness. Leave to rest and cool for five minutes or so before serving.
Michael Kelly is an author, broadcaster and founder of GIY.