Effectively, if you are playing a gig for free, or if the total cost of petrol etc for all band members isn't covered by the fee, then you're paying to play. I imagine most have done this at least once during their playing life!
Its just about weighing up what the gig is worth to you. I would never pay a fee to play any venue/festival. In originals band, depending on the gig, I'd accept a loss after costs, price you have to pay before you're successful enough to demand more. Tribute/function band, the only time I'd ever play a gig where costs are not covered is if there is a well paid one right alongside it that pays enough to cover both.
At the end of the day, I just want to get out there and play music and making money is never an aim, but if I'm playing gigs where the venue is making a tidy profit on the night, I'm not accepting a loss.