I generally deal with this ahead of time rather than after the fact or I do something for them they didn't ask for but know they will appreciate.
For example, if I need a ride somewhere and I need to ask a friend for some reason, I would say:
If you have time on Saturday, could you take me to the airport/doctor/etc? I'll cover your gas for you.
Saying this in advance gives the person the chance to say thanks but no thanks for the gas money.
If you're not comfortable with this (or if they decline the cash payment), the second method may work better for you - do something else for them. So, if they take you to the airport, buy them a treat when you're on your trip - something small that shows you were thinking of them - and tell them how much you appreciated the ride. Or, if they're helping you move or taking you to the doctor, perhaps offer to treat them to lunch or a movie or a drink since they're taking their time.
None of this is necessary but it's really great to offer it so that you don't seem like a help vampire.
All this said, if you've done this and they really respond negatively to your offers of payment, respect that and remember it and don't offer again. It's important not to make them feel uncomfortable, too!