Melt the butter in a medium saucepan over medium heat. Once melted and foaming, add the flour and whisk constantly for about 1 minute to create a smooth paste (this is called a roux, and it removes the raw flour taste). Gradually pour in the milk while whisking continuously to avoid lumps. Continue whisking and let the mixture simmer for 2-3 minutes until it thickens enough to coat the back of a spoon. Remove from heat, then whisk in the salt and pepper. I like to taste the sauce at this point and adjust seasoning if needed—a well-seasoned sauce makes the entire dish better.
Heat your oven to 350°F and spray a 9x13 inch baking dish with cooking spray. While the oven preheats, prepare your mise en place: grate the Gruyere cheese if it's a block (freshly grated melts much better than pre-shredded), cut the ham into roughly 2-inch pieces, and cut each biscuit into 6 pieces. Having everything ready before assembly makes the layering process smooth and efficient.
Pour the béchamel sauce from Step 1 into the prepared baking dish, spreading it evenly across the bottom. Scatter half of the ham pieces over the sauce, then distribute half of the biscuit pieces in an even layer over the ham. Sprinkle half of the grated Gruyere over this layer. Top with the remaining biscuit pieces, spreading them out so they're not too tightly packed (they need room to rise). This layering technique ensures every bite has sauce, ham, and cheese distributed throughout.
Bake the assembled dish for 20 minutes until the biscuits are lightly golden but not fully cooked. Remove the pan from the oven (keep it at 350°F). Using the back of a spoon, gently press down and create 6 wells in the biscuit layer, spacing them evenly—these wells will hold your eggs and prevent them from rolling around. Sprinkle the remaining Gruyere cheese into the wells and over the top of the dish.
Crack one egg into each well, being gentle so the yolks stay intact. Season the eggs lightly with salt and pepper. Return the pan to the 350°F oven and bake for 10-15 minutes, until the biscuits are deep golden brown and the eggs are cooked to your preference—the whites should be set while the yolks can range from runny to firm depending on how long they bake. I prefer pulling it out when the yolks still jiggle slightly for that classic runny-yolk breakfast experience, but cook to your liking.