The “Gate Closes” time shows when you can last board, and after that the airline won't accept any more passengers onto the aircraft. In your case, I would say that you were lucky (the agent at the gate probably felt bad for you and let you in - it's the most likely thing that could have happened.)