01 - Preheat the oven to 400°F. Lightly butter a medium gratin dish or 4 individual ramekins and set aside.
02 - In a medium saucepan over medium heat, melt 2 tbsp unsalted butter. Add the finely chopped shallot and minced garlic, sautéing until softened and fragrant, about 2 minutes.
03 - Sprinkle the flour into the saucepan and cook, stirring constantly, for 1 to 2 minutes until the raw flour smell dissipates and the roux turns a light golden color.
04 - Gradually whisk in the warmed whole milk and heavy cream, stirring continuously. Cook for 2 to 3 minutes until the sauce thickens and becomes smooth.
05 - Add the softened cream cheese, shredded Gruyère, and shredded sharp cheddar to the sauce. Stir until completely melted and creamy. Mix in the Dijon mustard, Old Bay seasoning, cayenne pepper (if using), and season with salt and freshly ground black pepper to taste. Remove from heat.
06 - Gently fold the jumbo lump crab meat and 2 tbsp chopped chives into the cheese sauce, taking care not to break apart the crab lumps. Transfer the mixture evenly into the prepared gratin dish or ramekins.
07 - In a small bowl, combine the panko breadcrumbs, grated Parmesan cheese, and olive oil (or melted butter). Toss until the crumbs are evenly moistened, then spread the mixture uniformly over the crab filling.
08 - Bake in the preheated oven for 18 to 22 minutes, or until the gratin is bubbling and the topping is a deep golden brown.
09 - Remove from the oven and let rest for a few minutes. Garnish with additional chopped chives and serve warm with lemon wedges on the side.