Preheat oven to 375 degrees F. Butter a 9 by 13-inch baking dish or similar sized casserole dish.
Arrange the sliced potatoes in the prepared dish. In a medium saucepan, saute the minced garlic in butter over medium heat until softened and fragrant. Stir in flour and cook for 3 minutes. Gradually whisk in the cream until smooth and thick. Remove from the heat and stir in the cheeses. Season with salt and pepper.
Pour cheese sauce over the potatoes in the dish. Cover with foil and bake for 45 minutes. Remove foil and bake another 15 minutes until browned.