Preheat oven to 425°F (218ºC). Coat a 2-quart baking dish with nonstick spray.
Place cauliflower florets in a large glass bowl. Add 1 tablespoon water and ¼ teaspoon salt; toss to coat then place a large dinner plate over top (or cover tightly with a piece of plastic wrap). Microwave for 2 minutes, stir and continue to microwave in 1 minute intervals until crisp-tender, about 4–5 minutes total*. Drain and set aside.
Melt 2 tablespoons butter in a large sauté pan over medium heat. Add onions and garlic and cook until softened, about 5 minutes.
Whisk in flour, ½ teaspoon each kosher salt and black pepper, nutmeg, and cayenne and cook, whisking constantly, 2 minutes.
Slowly whisk in milk until thickened, 2 minutes. Off heat, stir in Gruyère and ¼ cup Parmesan, then stir in cauliflower until completely coated; transfer to prepared baking dish.
Melt remaining 2 tablespoons butter. Combine melted butter with Panko, remaining ¼ cup Parmesan, and thyme; season with salt and black pepper. Sprinkle crumbs evenly over gratin.
Bake until crumbs are golden brown and sauce is bubbly, 25–30 minutes. Let gratin rest 10 minutes.