Preheat oven to 425°F, and prepare a 9x9 baking dish with butter.
In a bowl, toss together butternut squash slices with olive oil, salt, pepper and thyme. In another bowl, toss together Yukon Gold potatoes with olive oil, salt, pepper and thyme. Set aside.
In a pot, heat milk, cream and butter to a simmer. Set aside.
Begin layering gratin, starting with a 1/4 cup of cream mixture, followed by a layer of squash, a handful of gruyere and a sprinkling of Parmesan. Repeat alternating layers of squash and potatoes, finishing the top with extra cheese and a sprinkling of thyme.
Cover with foil and bake for 20 minutes. Check doneness with a paring knife or toothpick in the middle. Remove foil and cook another 20 minutes until golden and bubbly.