Heat a large oven-safe skillet over medium-high heat and add 1 tablespoon oil. Sear the chicken breasts for 2-3 minutes per side until nicely browned. Transfer to a plate and cover with foil.
Reduce to medium heat and add the remaining oil if needed. Add the sliced onions and cook for 15-20 minutes, stirring often, until they’re soft and caramelized to a golden brown.
Add the minced garlic and fresh thyme to the caramelized onions. Cook for another 1-2 minutes until fragrant.
Pour in the beef broth and balsamic vinegar, then season with salt and pepper. Stir to combine and scrape up any flavorful bits from the bottom of the pan.
Return the chicken to the skillet, spoon some sauce over each piece, and simmer uncovered for 15-20 minutes. Flip the chicken halfway through for even cooking and cook until the internal temperature reaches 165°F.
Top the chicken with the caramelized onion sauce and sprinkle with shredded gruyere. Broil for a few minutes until the cheese is melted and bubbly.
Garnish with fresh thyme leaves if desired and serve hot.