There is nothing you can do with certainty that falls outside the terms of the contract that you entered into. IANAL*, but your (paperless) ticket represents your acceptance of the terms offered. If they can be proven to have violated those terms you have a case. If not, you have no case. They may choose to "be nice", but that's their choice.
Some airlines have been shown to slow down the checkin process on occasion in order to reduce the number of passengers flying. They may do this due to overbooking but usually it is a gain for them from a paid fare and less loaded weight. Every $ helps when you are at the bottom of the pecking order in an industry where the average profit since the start of commercial aviation has been 0%.
If you have your bag on board and they cannot get it off you will fly :-).
Hong Kong a few years ago:
I puff up about 5 minutes late for complex and irrelevant reasons.
They "I'm sorry sir - you have missed your flight".
I - "But, my bag is on board". The wonders of in-town checkin.
They could have given me a boarding pass and I would have run.
Instead they conferred for about 10 minutes THEN gave me a pass, took me through the aircrew security route, made me hire a golf-cart type vehicle they use there (I could have and would have run faster). and got me on board.
I'm guessing that the conferring was along the lines of "Can we get his bag off?"
On another occasion at Shenzhen for reasons not really my fault I was late at the gate AND they got my bag off when they could have got me on instead.
I would NEVER be late for a Ryan Air flight.
I'd be far earlier and more careful about timing than for most others.
If I was ever silly enough to fly Tiger Air (= Singapore airlines in a really ugly mood) I'd be really early AND have backup plans for when the flight was cancelled as "it happens" more often than is desirable.
Best advice, alas, is - If you care about losing your fare don't do things that cause it to happen.
Note that on any missed flight they are obliged to refund all taxes (and probably all or most non-airline fees.) You can stand on the counter and yell over a refusal to do that, or spread abroad that they have done so improperly, if that's your style. Or keep on bothering them until they refund it. [[Fuel surcharges are an interesting thought - can they legitimately charge these if you have not flown? Maybe]]. Note also that they will probably not offer a tax refund if you do not ask.
QANTAS gave me a Sydney-Gold Coast flight free when I was a day late because another airline failed to meet their obligations 1/3 of a world away and I had booked the last leg separately. Technically I had done my dough. They told me this. I said I understood but I knew QANTAS were good guys and I was sure they would work out something to help me as I had given them the money. After a while they gave me a "free' ticket. To achieve this sort of result you need to fly with the good guys. If it is eg Ryan Air, learn the expensive lesson and move on.