Heat the oil in a large skillet over medium-high heat.
Cook garlic, stirring frequently, until golden, about 5 minutes. Transfer with a slotted spoon to a paper-towel-lined plate.
Reduce heat to medium and cook onions, stirring occasionally, until golden brown, about 15 minutes.
Add garlic and remaining ingredients, except chicken, to a skillet with 1 teaspoon salt and ½ teaspoon pepper and simmer, stirring occasionally, until sauce is slightly thickened, about 25 minutes.
Pre-heat oven to 450°F with rack in the middle.
Coast chicken with half of sauce, then roast, skin side up, in a large baking dish or pan for 25 minutes.
Remove from oven and brush with remaining sauce, then continue roasting until chicken is cooked through and well browned in spots, 25 minutes more, or until the internal temperature of the largest piece reaches 165°F. (You may need to remove the smaller pieces first, and then roast the large pieces for a little longer).