Preheat the oven to 425°F and position the rack in the middle of the oven.
Cut 1/4-inch from the top of the head, exposing the individual cloves of garlic. In the bottom of a cast iron skillet or oven-safe skillet, arrange the garlic, onions, and lemon. Be sure that the garlic is face down in the skillet. Drizzle with 2 tablespoons of olive oil and season with 1½ teaspoons of salt, and 1/4 teaspoon pepper. Give it a gentle toss and push the contents to the side, making room for the chicken. Be sure that the garlic is face down in the skillet.
Remove the chicken giblets from the cavity of the chicken and pat the outside dry. Stuff the cavity of the chicken with the thyme and rosemary. Place the chicken in the center of the skillet and drizzle with remaining 2 tablespoons of olive oil, remaining 1 teaspoon of kosher salt, and 1/2 teaspoon black pepper. Tie the legs together with kitchen string and tuck the wing tips under the body of the chicken.
Transfer to the oven and roast, basting the chicken every 20 minutes. After 40 minutes, add the white wine to the bottom of the pan, baste the chicken, and reduce the temperature to 375°F. Return the chicken to the oven and continue to cook until the chicken is cooked through, about 20 more minutes, or until the chicken is golden brown and the juices run clear when you cut between the leg and thigh.
Remove the chicken from the oven and let rest for 15 minutes while you prepare the gravy.