The best tip is to wipe the lid and threads clean before putting the lids back on, but it's too late for that one. Another one that is too late is to use a piece of cling wrap to cover the bottle before putting the lid on.
There are a few methods to remove recalcitrant lids that I've used:
Use a large elastic band, the kind you see holding broccoli in the grocery store. I've put them on the lid, and it stops the grooved rim from shredding your hand.
Run the bottle under hot water, as hot as you can stand (or use a pair of pliers to hold it), that may soften the stuck paint enough to release the lid.
Or use two of the rubber strap style oil filter wrenches to gain some additional leverage. They also make smaller versions for people who have a hard time with lid on jars.
Second to last resort is to use two channel lock style pliers, caution must be used as it is pretty easy to break the lid and glass bottle.
The last resort requires chucking the #$%^ bottle in the garbage and buying another! Yes, I've done that, sometimes it's better to toss out a few bucks than to suffer frustration!