Preheat the oven to 375°F (190°C).
Prepare your baking dish by greasing it with butter.
In a large mixing bowl, combine all sliced root vegetables, garlic, thyme, salt, and pepper.
Layer half of the vegetable mixture evenly in the prepared baking dish.
Pour half of the heavy cream over the first layer, followed by half of the Gruyère and Parmesan cheese.
Repeat the layering process with the remaining vegetables, followed by the remaining cream and cheeses.
Cover the baking dish with foil and bake for 35 minutes.
Remove the foil and bake for an additional 20-25 minutes, or until the top is golden brown.
Let the gratin rest for 10 minutes before serving.