Preheat the oven to 400°F. Grease a 9x13-inch baking dish with gluten-free nonstick cooking spray.
Melt 1 tablespoon coconut oil in a medium skillet over medium heat. Add the onions and sauté until translucent and tender, about 5-7 minutes.
Place cauliflower florets in a large bowl. Add the cooked onions to the bowl, keeping the burner on. Add the remaining 3 tablespoons of coconut oil to the same skillet and, when melted, slowly whisk in the flour until dissolved. Gradually whisk in the broth, mayonnaise, sour cream, and salt, and continue to whisk over medium heat until the sauce is thick and bubbly. Pour the sauce into the large bowl with the cauliflower and onions and add the shredded cheese. Mix well.
Pour the mixture into the baking dish, top with breadcrumbs, cover loosely with foil, and bake until the cauliflower is tender (about 45-60 minutes).