Halve the fennel bulbs lengthwise. Set aside the green fronds for garnish. Remove the coarse outer skins from the garlic cloves, leaving them otherwise unpeeled.
Heat the olive oil in a heavy pan over medium heat. Place the fennel halves cut side down and distribute the garlic cloves between them. Sprinkle with salt, cover, and simmer for 15 minutes.
Flip the fennel halves, season with salt again, and simmer uncovered for another 15 minutes.
Pour half the white wine over the fennel and place the halves cut side down again. Reduce heat to low and stew for 1 hour, adding the remaining wine gradually throughout cooking.
Sprinkle with the sugar and pepper. Garnish with the reserved green fennel fronds. The cooking liquid should be golden yellow and syrupy.
Serve the softened garlic cloves on the side. Squeeze the cloves out of their skins to make a puree—it tastes wonderful with meat, the fennel, or crusty bread.