Preheat oven to 375ºF. Prepare gnocchi according to package directions. Drain and place gnocchi in a single layer in a 10-inch quiche pan or 9-inch baking dish sprayed with cooking spray.
Melt butter in a medium saucepan over medium heat. Stir in garlic and cook until fragrant, about 30 seconds. Whisk in flour until it thickens and bubbles, then whisk in milk and Dijon. Continue to whisk mixture and cook until slightly thickened, about 3-5 minutes.
Remove from heat. Add gruyere and fontina cheese. Stir until melted. Add basil, salt, and pepper.
Pour sauce over gnocchi and sprinkle with Parmigiano-Reggiano cheese over top.
Bake uncovered for 25 minutes, until the cheese is golden and bubbly. Let gnocchi rest for 5 minutes before serving.
