Melt butter blocks in a large heavy-base saucepan over medium heat. Add the onions, garlic and sugar. Cook for 40 minutes, stirring occasionally, until onions are tender and well caramelised.
Increase the heat, add the stock and bay leaf, season with salt and pepper. Simmer gently for 15 minutes. Preheat grill on high.
Remove the bay leaf and ladle soup into 4 ovenproof bowls. Top each with 2 slices of toast and sprinkle with gruyere cheese. Place under the grill to melt the cheese and serve immediately.