Combine the preserves, 1 tablespoon vinegar, the mustard, thyme and 1/2 teaspoon each salt and pepper in a small bowl. Poke the pork in a few spots with a paring knife, then rub with the garlic; season with salt and pepper. Rub the pork all over with the preserves mixture, then transfer to a large resealable bag and refrigerate at least 2 hours or overnight.
About 20 minutes before roasting, remove the pork from the refrigerator and preheat the oven to 325 degrees F. Put the red onions in a metal roasting pan and set a rack on top. Wrap the pork with the bacon (see below), then set on the rack. Roast until the bacon is crisp and a thermometer inserted into the center of the pork registers 145 degrees F, about 1 1/2 hours. Transfer the pork to a cutting board; let rest 10 minutes.
Meanwhile, make the gravy: Discard all but 2 tablespoons of the drippings from the pan. Place the roasting pan over 2 burners over medium-low heat and whisk in the flour until incorporated. Add the chicken broth and whisk until thickened, about 5 minutes. Add the remaining 2 tablespoons vinegar and season with salt and pepper.
Remove the twine and slice the pork. Serve with the onions and gravy.
How to wrap pork:
Lay the bacon slices over the pork, overlapping them slightly and tucking them under.
Tie a piece of kitchen twine around each slice to secure it.