In a large pot, melt butter over medium heat. Add the onions, stir well, cover, and cook for 5 minutes. Uncover the pot, reduce heat to medium-low and continue to sauté, stirring occasionally, until onions are tender and deep golden brown and sweet, about 30 - 40 minutes.
Increase heat to medium-high. Sprinkle the flour over the onions and stir until combined. Add the wine, beef broth, thyme, bay leaf, Worcestershire sauce, and salt and pepper to taste. At first boil, reduce heat to medium-low and simmer, uncovered for about 30 minutes. Taste and adjust the seasoning if necessary. Remove bay leaf and discard.
Place the rack of your oven in the center and turn the broil on.
Distribute the soup into individual oven-safe bowls, place 1-2 slices of bread over the soup, if desire, and top with plenty of Gruyere cheese.
Bake until cheese is melted and bubbling, about 2-3 minutes.