Preheat the oven to 400°F (200°C). Grease an 8x8-inch square baking dish with nonstick cooking spray.
Use a sharp knife to cut off the tops of the garlic heads and place them cut-side up on a large piece of foil. Drizzle the exposed garlic cloves with olive oil and season with salt. Bring up the corners of the foil around the garlic, then roll closed to form a tight packet. Place the packet on a baking sheet and roast in the preheated oven for about 45 minutes, or until the garlic is caramelized. Remove from the oven and let sit for about 15 minutes, or until cool enough to handle.
Unwrap the foil packet and squeeze the heads to release the roasted garlic cloves into an upright blender. Add the half-and-half, heavy cream, and cream cheese, followed by ½ cup Gruyère, ½ cup cheddar, 2 tablespoons Parmesan, and ½ teaspoon kosher salt. Blend until the sauce is smooth.
Arrange the sliced potatoes in even rows in the prepared baking dish.
Pour the sauce over the potatoes, making sure to get in between the potato slices.
Evenly top the potatoes with the remaining ½ cup Gruyère, ½ cup cheddar, and 2 tablespoons Parmesan. Season with thyme and freshly ground black pepper.
Cover the baking dish with foil and bake in the preheated oven for 40 minutes. Remove the foil and cook for another 15-20 minutes, until the potatoes are tender and the cheese is evenly browned.
Let cool slightly, then garnish with chives to serve.
Enjoy!