Caramelize the onions: Heat the butter and olive oil in a large skillet over medium-low heat. Add the sliced onions, salt, pepper, and optional sugar. Cook slowly for 25–35 minutes, stirring occasionally, until the onions turn golden brown, sweet, and deeply caramelized. This step builds the rich, emotional flavor of the dip.
Prepare the creamy base: In a mixing bowl, combine the sour cream, mayonnaise, garlic powder, and half of the grated Gruyere cheese. Stir until everything is smooth, creamy, and well blended. The mixture should already smell rich and inviting.
Add the caramelized onions: Once the onions are soft and golden, transfer them to the mixing bowl. Fold them gently into the creamy mixture, allowing the warm onions to melt the flavors together into a luscious, savory base for the dip.
Transfer and top with cheese: Spoon the dip mixture into a baking dish, spreading it evenly. Sprinkle the remaining Gruyere cheese over the top to create a gorgeous, melty, golden crust as the dip bakes.
Bake the dip: Place the baking dish in a preheated 375°F (190°C) oven and bake for 15–20 minutes. The top should be bubbly, lightly browned, and irresistibly fragrant. This makes the dip warm, melty, and perfect for dipping.
Serve warm: Remove the dip from the oven and let it cool slightly. Garnish with fresh thyme if desired. Serve with warm bread, crackers, or chips. Every scoop is creamy, comforting, and full of luxurious, cozy flavor.