Preheat oven to 375°F (190°C). Butter a baking dish.
- In a saucepan, heat cream, garlic, salt, and pepper over medium heat until warm but not boiling.
- Arrange a layer of potato slices in the baking dish.
- Pour a small amount of warm cream over potatoes and sprinkle with Gruyère cheese.
- Repeat layers until all potatoes, cream, and cheese are used, finishing with a generous layer of Parmesan.
- Dot the top with butter.
- Cover with foil and bake for 40 minutes.
- Remove foil and bake for an additional 20-25 minutes until top is golden and bubbly.
- Let rest for 10 minutes before serving. Garnish with fresh herbs if desired.