Rub the cut sides of the garlic over the bottom and sides of an 8-inch baking dish.
Spread a layer of potato slices in the bottom of dish. Pour in a third of the heavy cream; sprinkle a third of the Comte cheese on top. Season with salt and black pepper. Repeat layers twice more, ending with layers of heavy cream and Comte cheese.
Bake in the preheated oven until potatoes are tender and cheese is golden brown, about 1 hour.