Caramelize the onions: Melt 1 tbsp butter in a skillet over medium-low heat. Add sliced onions and cook, stirring occasionally, for 25-30 minutes until golden and sweet. Set aside.
Preheat oven to 350°F (175°C).
In a large bowl, combine ground beef, breadcrumbs, eggs, Worcestershire sauce, thyme, salt, pepper, and half of the caramelized onions. Mix until just combined—don’t overwork it!
Form the mixture into a loaf shape on a baking sheet or in a loaf pan. Bake for 45 minutes.
Meanwhile, make the gravy: In a small saucepan, melt 1 tbsp butter over medium heat. Stir in flour and cook for 1 minute. Add 1 cup beef broth and the remaining onions, stirring until thickened (about 3-5 minutes).
Pour the gravy over the meatloaf, sprinkle with Gruyère cheese, and bake for another 10 minutes until the cheese is melted and bubbly.
Let the meatloaf rest for 5-10 minutes before slicing and serving.
Notes
Use Swiss cheese if Gruyère is unavailable. You can also make the onions ahead to save time on cooking day.