How to Make It
Preheat the oven to 375°. In a 9-inch cake pan, drizzle the garlic with the oil. Cover with foil and roast for 40 minutes, until tender. Let cool, then squeeze out the cloves.
Mash the garlic to a paste and transfer to a saucepan. Add the half-and-half, thyme and rosemary and bring to a boil. Simmer over very low heat until reduced to 3 cups, 20 minutes; season with salt and pepper.
Arrange one-fourth of the potatoes in the bottom of a 9-by-13-inch baking dish. Top with one-fourth of the shredded cheeses and drizzle lightly with the garlic cream. Repeat the layering with the remaining potatoes, cheese and cream. Pour any remaining cream on top and press the top layer of potatoes to submerge it.
Bake the gratin for about 1 1/2 hours, until golden and bubbling. Let cool for 20 minutes before cutting into squares and serving.