Melt 2 tablespoons of butter in a large skillet over medium heat. Add the sliced onions and cook slowly for 20 minutes, stirring often, until they turn deep golden and caramelized. Remove half the onions and set them aside for the gravy.
In a mixing bowl, combine the ground turkey, panko breadcrumbs, egg, thyme, salt, pepper, and the remaining caramelized onions. Mix gently until just combined.
Shape the mixture into a loaf and place it in a loaf pan. Bake at 375°F for 45 minutes until the internal temperature reaches 165°F.
While the meatloaf bakes, make the gravy. In the same skillet, melt the remaining tablespoon of butter over medium heat. Add the chopped shallots and cook for 3 minutes until softened.
Sprinkle the flour over the shallots and stir for 1 minute. Slowly whisk in the chicken broth and bring to a simmer. Cook for 5 minutes until the gravy thickens slightly. Stir in the reserved caramelized onions.
Slice the meatloaf and serve with the warm shallot gravy spooned over the top. Sprinkle with fresh parsley.