Apartment gates are a joke!!! The last time we lived in one, it was much the same scenario. I would get SO frustrated getting stuck behind someone who didn't know their code. Part of the problem was the visitors and residents had to use the same keypad so if you didn't live there, you just pulled up to the keypad and dialed the resident's unit and they buzzed you in by pressing a number on their phone. BIG PAIN for the residents if you had some moron in front of you trying to track down a friend who hasn't home. And, to top it off, people were tailgating behind others and rushing through the gates to get in creating havoc not to mention breaking several sets of gate arms. I can't count how many times those got replaced.
The best system I ever saw was at an apt. complex in Texas. Residents got gate passes that looked like a toll tag. You put it in your windshield and as you drove up to the gate, it would automatically open for you. The entrance was long enough to where you only had to slow down a little before it opened making the whole process less of a pain. And, they had clearly marked off a "Guest" area and you had to drive down a separate driveway/entrance if you were a guest. It kept them out of the way of residents.