In most cases, you have no choice. Most often it occurs when you are flying a small plane and the overhead bins do not have enough room. If it happens on a large plane, it means all overhead space has been taken and your carry-on bag will now be checked to baggage claim. No advantage at all.
Gate checking is not an option for cheking your large suitcases with an agent.