Preheat your oven to 350°F (180°C).
Rub a baking dish with butter to prevent sticking.
In a saucepan, heat the cream and minced garlic over medium heat until it just starts to simmer. Remove from heat.
Layer half of the sliced potatoes in the bottom of the baking dish. Season with salt and pepper.
Pour half of the warm cream mixture over the potatoes.
Add the remaining potatoes in another layer on top. Season with salt and pepper.
Pour the rest of the cream mixture over the potatoes.
If desired, sprinkle the grated cheese on top of the potatoes.
Cover the baking dish with foil and bake in the preheated oven for about 45 minutes.
Remove the foil and bake for an additional 15-20 minutes, or until the top is golden brown and the potatoes are tender.
Let the Gratin Dauphinois rest for a few minutes before serving.