Preheat the oven to 350 degrees F (175 degrees C).
Combine ground beef, bread crumbs, chili sauce, egg, salt, and freshly ground black pepper in a large bowl; mix well. Press mixture into an 8x4-inch loaf pan, then place the loaf pan on a rack in a roasting pan.
Bake in the preheated oven until meat is well done with no trace of pink, about 1 hour. An instant-read thermometer inserted into the center of the loaf should read at least 160 degrees F (70 degrees C). Let rest for 10 minutes while you make gravy.
Make gravy: Melt butter in a medium saucepan over medium heat. Add mushrooms and onions; cook and stir until tender. Add beef broth and simmer, stirring occasionally, for 5 minutes. Mix together water and cornstarch in a small cup; stir into broth. Cook and stir until gravy is thickened, about 1 minute.