First off, you have to accept that laws are subjectively enforced here. Some gated communities have a formal resident's association, others do not. Some are considered completely private others make use of public roads with a gate that can be removed at the whim of municipal officials.
Some communities have enforceable rules and fees, others are more of an informal community agreement style with no ability to enforce collection of monthly maintenance fees if a resident decides not to pay. There seems to be more informal communities than there are completely private and rigorously restricted communities.
To be a gated community all you need is a perimeter cattle fence and a gate. Not all gated communities are equal.
Example, Ocean Village. To get into that community and spend the day wandering around, all you have to say at the gate is, "I 'm going to the restaurant."