Heat oven to 375°F and butter a baking dish
Melt butter in a small pan until golden, then stir in maple syrup, thyme, salt, and pepper
Toss beet slices in half the maple-butter mixture
In the baking dish, line up rows alternating beets, golden sweet potato, and orange sweet potato until the dish is full
Sprinkle Gruyere between a few layers and drizzle the remaining maple-butter mixture over the top
Cover with foil and bake for 45 minutes
Uncover and bake for 15-20 minutes more until bubbly and tender
Top with fried shallots and pomegranate seeds if using, let sit 10 minutes, then slice and serve
