Heat the oven to 400 degrees.
Place the cream, garlic and bay leaves into a small saucepan. Heat on low for 15 minutes.
Grease a 9×13 baking dish with the butter.
Place the potatoes, Hatch chiles and onions into a large bowl. Remove the garlic and bay leaves from the cream mixture. Pour the cream over the vegetable mixture. Stir well to coat. Take a few spoonfuls of the cream and place it on the bottom of the baking dish.
Remove the potato mixture from the cream and lay in overlapping layers until the bottom of the dish is covered. Sprinkle with salt and then with a handful of gouda and cheddar cheese. Continue this process until all the vegetables are used. Press down on the gratin to compress the layers then pour the remaining cream onto the gratin.
Top with the remaining gouda and cheddar.
Combine the melted butter and bread crumbs. Evenly distribute over the top of the gratin.
Place in the oven and bake for 1 hour (or until the potatoes are easily pierces with a knife and feel cooked). Lightly cover the gratin with foil if the top is browning too quickly.
Serve warm topped with cilantro leaves and a squeeze of fresh lime juice. Salt to taste.