1. Bring a large pot of salted water to a boil. Add potatoes and cook, removing when not quite tender, 25 to 30 minutes. Drain and set aside until potatoes are cool enough to handle.
2. In a small skillet, melt 1 Tbsp. butter over medium heat. Add onion and cook, stirring occasionally, until tender, about 6 minutes. Add garlic and cook, stirring, until fragrant, about 2 minutes longer. Transfer to a medium bowl and let cool.
3. Preheat oven to 350ºF and line a large baking sheet with foil. Generously butter a 9-by-13-inch baking dish and place it on lined baking sheet. Add Gruyère, Cheddar, Parmesan, thyme, 2 tsp. salt and 1 tsp. pepper to onion mixture and stir until well combined.
4. Peel and slice potatoes 1/4-inch thick. Arrange 1/3 of potatoes in baking dish, overlapping where necessary, and sprinkle with 1/3 of cheese mixture. Repeat layering twice, finishing with cheese. Pour cream over all potatoes and press bay leaves on top. Bake until cream is mostly absorbed and top is golden brown and bubbling, about 1 hour 15 minutes. Remove bay leaves. Let cool for 10 minutes and serve.