Preheat oven to 350F.
Bring milk, garlic, thyme, sage, and salt to a boil in a medium saucepan. Once it boils, shut off the heat and let it steep while you make the rest of the gratin.
If you prefer peeled potatoes in a gratin, peel them. Then slice your peeled or unpeeled potatoes very thin. I slice mine 2 mm thick on a mandoline. If yours are thicker, you will need to add more cooking time.
To layer the potatoes and cheese in the gratin dish, put down a layer of potatoes, then a layer of cheese, followed by two more layers of each. You will have three layers of potatoes each topped by a layer of cheese. Once that is done, remove the garlic from the steeped milk and pour the milk over the gratin.
Cover the gratin with foil and bake for 1 hr 15 mins. Check the potatoes with a skewer or a fork. They should be tender all the way through. If not, give them another 10 minutes.
Remove the foil and bake for 15 minutes more to brown the topping. Let the gratin sit for 15-20 minutes on the counter to let the potatoes absorb the milk and for the gratin to firm up.