I would suggest that you set a time to leave, discuss with husband and maybe have a built-in 'grace' period to linger. If a dinner party that begun at 6 and you really, really want to be home by 10; you agree upon a leave time of 8:45. At that time, you start your good-byes, gather your purse and coat, get your husbands, give it to him, and remind him that you MUST leave by 9 in order to do thus and so.
Or if you have two cars, leave when you want to, and let him come home when he wants to. " Honey I am exhausted and I must leave early for work, gym, take dog to vet" and I am going home to rest", you stay and visit all you want to.
He may say oh just one more story, you stand indulgently with a smile and say OK, just one. The you firmly take him by the arm and drag him out. (not really). I hope with time it will get easier.
Do you have children? No? When you do have children, then the babysitter may come into play.
If you are at a cabin or vacation place, do the same thing. Establish a leave time and while you may the one who will have to load the car, gather everything up, etc., do so, and then repeat the above.
Hope this helps.