Adjust oven rack to middle position and preheat to 375 degrees.
Melt butter in a skillet over medium high heat, add garlic and cook until fragrant, about 1 minute. Add frozen spinach and cook until spinach is defrosted and water has evaporated, about 8 minutes. Remove from heat and season to taste with salt and pepper.
In a bowl combine bread, cooked spinach and gruyere, then in a separate bowl whisk together eggs and milk. Pour egg mixture over bread mixture and mix until evenly coated. Bake until puffed and golden and serve along with fried eggs if desired.