Preheat your oven to 375°F (190°C).
Melt 1 tablespoon of butter in a saucepan over medium heat.
Add flour and whisk for about 1 minute to create a roux.
Gradually add milk, whisking continuously until thickened.
Season with salt and pepper, then remove from heat.
Spread the roux on two slices of bread.
Layer ham and Gruyère cheese on the sauced bread.
Top with another slice of bread to form a sandwich.
Toast the sandwiches in a skillet with the remaining butter until golden.
Fry the eggs until the whites are set and yolks remain runny.