Preheat your oven to 350°F (175°C).
Butter a 9x13 inch baking dish.
Layer half of the potatoes in the prepared baking dish. Season with half of the salt, pepper, and garlic.
Over the potatoes, pour half of the heavy cream, then sprinkle half of the cheese over the cream.
Repeat the layering with the remaining potatoes, salt, pepper, garlic, cream, and cheese.
Dot the top with pieces of butter.
Cover with foil and bake for 40 minutes.
Remove foil and bake for an additional 20 minutes, or until the top is golden brown and bubbly.
Let it cool for a few minutes before serving.