Preheat the oven to 400 F. Be sure to use an oven-safe skillet. If you don't have one, you can use a casserole dish for the last step.
While the oven is preheating, slice the onions about ¼-inch thick slices. Thinly slice the garlic. If the cheese is not shredded, shred it now.
Add the butter to a large skillet and put over medium heat. Once melted, add the sliced onions and ½ teaspoon of kosher salt. Cover and cook for 7 to 9 minutes, stirring every 2 to 3 minutes.
Remove the lid and let the onions cook until the moisture has evaporated and they are starting to turn golden, about 8 to 10 minutes. Stir every 1 to 2 minutes during this process.
Add the garlic, black pepper, and thyme sprigs. Stir and cook for 1 minute.
Add the balsamic vinegar, stir, and cook for 30 seconds. Add the beef broth, stir into the onions, and cook until it reduces to a jam-like consistency, about 10 minutes. Remove the thyme stems and discard.
Turn the heat off and spoon about ⅔ of the onions out of the pan and set aside. Evenly spread the rest of the onions on the bottom of the skillet.
Season the chicken on both sides with the remaining 1 teaspoon of kosher salt and place them on top of the onions. Spoon the remaining onions on top of the chicken. Sprinkle the Gruyere evenly over the onion-coated chicken. Bake for 15 to 20 min, until the internal temperature of the chicken reaches 165 F. If desired, broil the dish to brown the cheese before serving.