Preheat oven to 350°F. Heat olive oil in a large skillet over medium heat. Once the pan is hot, add the onions to the pan and cook until soft and tender, about 15 minutes.
Add the balsamic vinegar and erythritol, if using, to the pan with the onions, and stir to combine. Cook for an additional 5 minutes.
Add the cauliflower florets to a cast iron skillet and toss to combine with the onions.
In a small bowl, combine the heavy cream, parmesan cheese, salt and pepper. Pour the mixture over top of the cauliflower.
Sprinkle the gruyere over top and bake for 40 minutes or until the cauliflower is tender and the top is golden brown and bubbly.