Here's a few tips to leaving a meeting well:
Schedule meetings back-to-back. If one meeting looks to runs long, you simply say, "my next meeting starts in 10 minutes, what else do you need from me to help you move forward?" This queues your colleague to start wrapping up the key action items and gives you the freedom to move on in 10 minutes. If you feel bad leaving someone before you've satisfied all their needs, remember they probably don't need an extra five minutes from you. They need an extra five hours. Do what you can in the time you have. Then move on.
Schedule meetings with yourself and your family. Think of leaving work as simply attending another meeting with yourself (or your family). You wouldn't show up late to a work meeting, so don't show up late to the meeting you set with your spouse. If a colleague tries to keep you late, you simply say, "I'd love to stay late and help on this, but I have another important meeting scheduled in 15 minutes, what can we get done in that time together?" What they don't know is that meeting is being at home with your family. This way you help how you can, and you don't cannibalize your family on the altar of work. This only works if you genuinely get to your calendar before your work does and you schedule family time first.
Schedule meetings in your colleague's office. Every office has the overly-chatty person who will pop by your office, ask a work question, then end up talking about the vacation their dentist took. A solution is to hold meetings in their office, so when you decide the agenda is complete, you can stand up and leave. You're no longer powerless to wait until they get the hint to let you get back to work. If you do get stuck hearing about "something something Cabo" then simply say, "Thanks for sharing, but I'm up against a pressing deadline right now, can we connect again later?" The pressing deadline could be email, and there's always enough of that.
We all balance tasks and people in our everyday lives. There's are errors to be made by focusing too much on either. If you need a little help reclaiming some time from those who don't appreciate the tasks you're required to accomplish, these tips will help.
P.S. And since we're talking about leaving meetings well, here's a free ebook on Leading Meetings Well. Feel free to share the link with a friend or colleague.