Preheat the oven to 350°. Arrange the baguette slices on a baking sheet, and toast for about 10 minutes, until golden.
In a large heatproof bowl, cover the lentils with boiling water and let stand for 15 minutes. Drain the lentils.
Meanwhile, in a large saucepan, cook the bacon over moderately high heat until browned, about 10 minutes. Add the onion, garlic, thyme sprigs and bay leaf and cook over moderately low heat, stirring occasionally, until the onion and garlic are tender, about 10 minutes.
Add the drained lentils and stock to the saucepan and bring to a boil over high heat. Reduce the heat to moderate and simmer, stirring occasionally, until the lentils are tender, about 45 minutes. Discard the thyme sprigs and bay leaf. Stir in the white wine and season the soup with salt and pepper.
Preheat the broiler. Ladle the soup into heatproof bowls, set them on a baking sheet and top each with a toasted baguette slice and the Gruyère. Broil for 2 minutes, until the cheese is bubbling and beginning to brown. Serve immediately, passing the extra toasted baguette slices at the table.
The lentil soup can be refrigerated for up to 2 days before broiling.