Heat oil in a large heavy skillet over medium heat, until shimmery.
Cook garlic, stirring occasionally, until golden, and then remove with a slotted spoon and set aside.
Add the onions to the oil, and cook, stirring occasionally until golden brown, about 15 minutes.
Add garlic and remaining ingredients, except chicken, to skillet and simmer, stirring occasionally, until thickened, about 25 minutes.
Preheat oven to 450 and place a rack in the center.
Brush half of the sauce over the chicken thighs and roast skin side up for 15-20 minutes.
Brush remaining sauce on chicken and roast until cooked through and well browned in spots, about 20 more minutes.
