Preheat your oven to 375°F (190°C) and grease a baking dish (approximately 9x13 inches) with butter or cooking spray.
In a large pot, bring water to a boil. Add a pinch of salt and the cauliflower florets. Cook the cauliflower for about 5-7 minutes or until they are tender but still slightly firm. Drain the cauliflower and set it aside.
In a skillet, heat the olive oil over medium heat. Add the onions and sauté them until they become translucent and slightly caramelized, which should take about 5 minutes.
In a medium bowl, add heavy cream or half-half cream, grated parmesan, Italian seasoning, salt and black pepper to taste. Mix everything well.
Arrange cauliflower florets in the greased baking dish. Add the caramelized onions on top of the cauliflower and then, pour the creamy parmesan sauce over the cauliflower and onions. Make sure that the sauce is evenly distributed.
Sprinkle the shredded gruyere or gouda cheese on top of the cauliflower.
Place the baking dish in the preheated oven and bake for about 20-25 minutes or until the cauliflower is tender and the cheese is bubbly and golden brown. Enjoy!