a gatekeeper: a person stationed at a gate or door to guard it and control who comes and goes
A gatekeeper is someone posted at an entrance to watch it, keep it secure, and decide who may pass. The word comes straight from the ordinary Hebrew word for a gate, so it names the person by the place he tends: the man of the gate.
Most of the time the word points to a specific kind of gatekeeper, the temple gatekeepers of Israel. These were an organized body of Levites, listed by name and family and assigned by lot to the entrances of the sanctuary. Their duty went beyond simply opening and shutting doors: they guarded the thresholds, kept watch through the night, controlled access so that nothing unclean entered, and took charge of storerooms, offerings, and the temple treasury. Chronicles, Ezra, and Nehemiah treat this as a settled office alongside the priests, the singers, and the other temple servants.
A handful of times the word simply means an ordinary gatekeeper at a city or town gate, the man who watches the entrance and passes word to the people inside. The two uses are the same job, one attached to the house of God and one to a walled town.