Heat oil in a 12-inch heavy skillet over medium-high heat until it shimmers. Cook garlic, stirring constantly, until golden, then transfer with a slotted spoon to a plate. Reduce heat to medium and cook onions, stirring occasionally, until golden-brown, about 15 minutes.
Add garlic and remaining ingredients, except chicken, to skillet with 1 teaspoon salt and 1/2 teaspoon pepper and simmer, stirring occasionally, until sauce is slightly thickened, about 25 minutes.
Preheat oven to 450°F with rack in middle.
Coat chicken with half of sauce, then roast, skin side up, in a 17-by 11-inch heavy 4-sided sheet pan 25 minutes. Remove from oven and brush with remaining sauce, then continue roasting until chicken is cooked through and well browned in spots, 20 to 25 minutes more.