Preheat your oven to 375°F (190°C). Grease a 9x13 inch baking dish with butter.
Wash and peel the Yukon Gold potatoes, then slice them very thinly using a sharp knife or a mandoline for uniform thickness.
In a medium saucepan over medium heat, combine the heavy cream, whole milk, minced garlic, thyme, rosemary, salt, and pepper. Stir well and heat until just simmering, then remove from heat.
Begin layering half of the sliced potatoes in the bottom of the prepared baking dish. Pour half of the cream mixture over the potatoes, ensuring they are well-coated. Sprinkle half of the cheddar and Gruyère cheeses evenly on top.
Add another layer with the remaining potatoes, followed by the rest of the cream mixture. Top with the remaining cheese, followed by the grated Parmesan cheese for a crispy finish.
Cover the dish with aluminum foil and bake in the preheated oven for 40 minutes. After 40 minutes, remove the foil and bake for an additional 20-30 minutes, or until the cheese is bubbly and golden brown, and the potatoes are tender when pierced with a fork.
Once baked, remove the gratin from the oven and let it cool for about 10 minutes. Garnish with freshly chopped parsley before serving.
Serve warm as a delightful side dish with your favorite protein or enjoy it as a comforting main.
Notes
Can be garnished with additional herbs if desired.