Heat the olive oil in a heavy pot over medium heat. Add the onions; cook and stir until golden brown, about 30 minutes.
Add butter, garlic, thyme, bay leaf, salt, and white pepper. Cook and stir for about 10 minutes. Increase the heat to high, and stir in the white wine. Bring to a boil, and cook until wine has reduced by half, 3 to 5 minutes. Pour in the chicken stock, and simmer over medium heat for 45 minutes.
Preheat the oven's broiler. Remove the thyme sprigs and bay leaf from the soup, and stir in the port wine. Ladle soup into 6 crocks or heat proof bowls, top each with a slice of bread, and a generous helping of Gruyere cheese. Place the bowls on a baking tray for ease in handling.
Place under the broiler for 2 to 3 minutes, until the bread and cheese are toasted and bubbly. Serve immediately.