Heat oven to 350° F. In a large saucepan over medium heat, whisk the butter and flour until smooth, 1 to 2 minutes. Gradually whisk in the milk until combined.
Add the broccoli and season with ½ teaspoon salt and ¼ teaspoon pepper. Increase the heat and simmer, stirring occasionally, until the broccoli is tender, 8 to 12 minutes.
Stir in the fontina and transfer to a 2-quart baking dish. Top with the onions and bake until browned, 5 to 7 minutes.