Preheat the oven to 375°F (190°C).
Grease a baking dish with butter.
Peel and thinly slice the potatoes using a mandoline or sharp knife.
In a saucepan, heat the heavy cream over medium heat.
Add minced garlic, salt, and pepper to the cream, stirring well.
Layer sliced potatoes in the baking dish, overlapping them slightly.
Pour a portion of the cream mixture over the first layer of potatoes.
Sprinkle a mix of Gruyère and Parmesan cheese over the cream.
Repeat layers until all ingredients are used, finishing with cheese on top.
Cover the dish with foil and bake for 40 minutes, then remove the foil and bake for an additional 20 minutes until golden brown.