Preheat the oven to 375 degrees F. Line a baking sheet with foil.
In a large bowl, combine the ground beef, breadcrumbs, egg, milk, minced garlic, Worcestershire sauce, thyme, salt, and pepper. Mix until just combined.
Shape the mixture into a loaf about 8 inches long and place it on the prepared baking sheet.
Lay the bacon slices over the top and sides of the loaf, tucking the ends underneath.
Bake for 50 to 55 minutes until the internal temperature reaches 160 degrees F and the bacon is crisp.
While the meatloaf bakes, melt the butter in a skillet over medium heat. Add the sliced onions and cook, stirring often, for 15 to 20 minutes until they turn deep golden brown.
Sprinkle the flour over the onions and stir for one minute. Slowly whisk in the beef broth and simmer until the gravy thickens, about 5 minutes.
Let the meatloaf rest for 5 minutes, then slice and serve with the warm gravy.