Prepare the Dish: Preheat your oven to 375°F (190°C). Grease a large baking dish with the unsalted butter.
Layer the Potatoes: Arrange half the sliced potatoes in an even layer at the bottom of the prepared baking dish.
Prepare the Cream Mixture: In a saucepan over medium heat, combine heavy cream, milk, minced garlic, salt, pepper, nutmeg, bay leaves, and thyme. Heat the mixture until warm but not boiling, stirring occasionally.
Assemble the Layers: Pour half of the warm cream mixture over the first layer of potatoes. Sprinkle half the shredded Gruyère cheese over the potatoes. Add the remaining potato slices in a second layer and pour the rest of the cream mixture over the top. Finish with the remaining Gruyère cheese.
Bake to Perfection: Place the dish in the oven and cover with a lid or foil. Let it bake for about 45 minutes, allowing the flavors to meld together. Uncover the dish and return it to the oven for another 25 to 30 minutes, or until the potatoes are soft and the top turns a rich, golden brown.
Serve: Allow the dish to cool slightly before serving. Garnish with a few sprigs of fresh thyme for a fragrant finish.