It helps to know which of the three reasons you are facing, because they have completely different amounts of give.
The bag does not fit. Small regional aircraft have overhead bins that will not physically take a standard carry-on. This is not negotiable at the gate and no amount of explanation changes the dimensions of the bin.
The cabin is full. A full flight runs out of bin space, so the last passengers to board lose. Highly negotiable — it is about sequence, not about you.
A blanket gate-check announcement. Often issued pre-emptively when the crew expects to run out of space. This is the one people assume is absolute and it is usually the most flexible of the three.
For your situation the important thing is that in the second and third cases the crew are solving a space problem and are generally willing to make an exception once they understand yours — but only if they hear about it before they have started collecting bags.