In a 9" 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 1/4 of potatoes in bottom of 9X13" baking dish. Top with 1/4 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 them.
Bake the gratin for about 1 1/2 hours, until golden and bubbling. Let cool for 20 minutes before cutting into squares and serving.
Make ahead through the layering and refrigerate overnight. Return to room temperature before baking.