If your gate is not stopping where it should you will need to look at the limit switch nut if it is a slide gate or it could also be the limit switch itself that is failing. You will need to make sure the limit nut is hitting the limit switch at the right time if not you can adjust the limit nut to hit the switch sooner.
If the limit nut hits the limit switch and the gate still keeps going then you most likely have a bad limit switch.
If you want to verify this before ordering a new switch. You can swap the limit switch with the other switch on the operator to see if gate stops when it hits the switch.
Other things that can cause gate not to stop are a bad control board or a grounding issue.