The main gate has two openings. One side has a gate opener and the other side is manual in case of emergencies and a fire truck needs to get in. However; the manual gate stays open because people who comes to visit my neighbors opens it to drive through and never closes it back. It stays open until I go outside and closes it back. There is no home owners association.
If I understand correctly, by locking the gate you would effectively deny your neighbors and their friends access. You cannot cut off their right of access.
Check what the rules or deed to the property says about the gate. If it does not say anything, try to reach an agreement with your neighbor. If the agreement works, talk to an attorney about recording it so that the same rule will apply to anyone who moves in.
Almost for certain the Fire Department would have insisted on two accesses to the subject property as a condition to approving the construction. Even if the local community rules allow you to lock the gate, I think it would be in error and violate the Fire Department Regulations. Certainly check with the Fire Department.
Neighbor law deals with the legal rights and responsibilities involved with having neighbors. Examples include boundary disputes, noise, and blocked views.
The term real estate means land and items permanently attached to it, like buildings. This area of law deals with who has the right to own and use these items.