Heat the oven to 200C/ gas 6.
Thinly slice two-thirds of the peeled parsnips (use a mandolin if you have one) and coarsely grate the rest.
Rub both cut sides of the garlic around a medium-sized baking dish, then smear it all over with the butter. Arrange the parsnip slices in rows over the base of the dish, overlapping slightly. Once you’ve used up all the slices, scatter the grated parsnip on top.
In a bowl, whisk the cream, creme fraiche, milk and thyme leaves. Season with a teaspoon of salt and lots of freshly ground black pepper. Pour this over the parsnips, so they’re just submerged. Sprinkle the ground almonds all over the top.
Drizzle with oil, cover the dish with foil and roast for 15 mins. Remove the foil, lower the oven to 180C (gas 4) and cook another half-hour, until the cream is absorbed, the top is golden and the parsnips tender.
While the parsnips are roasting, make the allioli. Put the apple chunks in a small pan, cover with water, cook on medium heat for about 8 mins until the fruit is soft. Drain, transfer to a food processor with the garlic and vinegar, and whizz to a puree.
With the motor running, start adding the oil a drop at a time, until you’ve added about a third, then increase your speed of pouring, to a trickle and then to a slow stream until you have used all the oil. Season to taste and serve in a bowl alongside the gratin.