The Password Gatekeeper was a loyal servant of Provost Willem. When the students left Byrgenwerth under Laurence's leadership, Willem kept both the Password Gatekeeper and Dores back at the institute. Willem was an old man when the students left, as shown in the scene where Laurence tells Willem he is leaving, so he would have been unable to continue his research into the Cord of the Eye (the One Third Umbilical Cord). Willem therefore sent Dores and the Password Gatekeeper into the Old Labyrinths (Chalice Dungeons) below Yharnam to further his research.
Unforunately, both Dores and the Password Gatekeeper encountered the eldritch Truth in the Labyrinth's and went mad. The eldritch Truth is the wisdom of the Great Ones as seen in the Madman's Knowledge description. At this stage the servants would have been of little use to Willem in his research and so were given more menial tasks. Dores was charged with guarding the graves in the Forbidden Woods. These graves have been erected over the Hintertombs, which are on the periphery of the tombs below Yharnam. The Password Gatekeeper was ordered to stand as a watchman of the gate into the Forbidden Woods, refusing entry to all but those who knew the sacred adage of the Healing Church which Laurence took with him from Byrgenwerth: “Fear the Old Blood.” Perhaps to Willem this ensured that only those who respected his views would be able to walk the grounds of Byrgenwerth once more.
The Password Gatekeeper appears to have carried out his duty loyally, though it seems to have caused him much suffering, and eventually his life. His skeleton is found sitting on a pillar at the entrance to the woods. His body, when interacted with says "Already dead" and will give the player a Madman's Knowledge item. If we examine his dialogue we can hear his fixated obsession with completing his duty, and the agony he went through reminding himself of this.