Combine the sugar and water in a heavy-bottomed saucepan. Bring the mixture to a boil; boil gently, brushing down the sides of the pan with a wet brush, until the mixture has turned a deep golden amber colour.
Stir in the onions, vinegar, rosemary and bay leaf. Cook over medium heat, stirring occasionally, until the onions are very tender and have taken on a mahogany wine color, about one hour.
Cover the bowl with plastic wrap and refrigerate for at least 24 hours or for up to 72 hours. Bring to room temperature before serving.
Remove the pan from the heat and immediately pour in the wine. The mixture will sputter and boil up, but gently stir it until it has calmed down. Return the saucepan to a medium-low heat. Cook, stirring, until the wine mixture has re-liquefied.
Using a slotted spoon, remove the onions to a separate bowl. Increase the heat to high and boil the mixture until it has reduced to just over 1 cup. Stir in the balsamic vinegar. Pour the wine mixture over the onions.
This dish is also wonderful with cipolline onions or even shallots.