Iudex Gundyr (and, by extension, Champion Gundyr) is the child of Oceiros, the Consumed King, born to link the fire when Lothric could not. However, the experiments wrought on him by Oceiros, his father, rendered him corrupted by the Abyss, and he was unable - or perhaps unwilling - to complete the task set to him. In short, he was too late to link the fire. Now, he stands guard over the Cemetery of Ash, acting as judge of the Unkindled awakened by the Firelink Bell. Maybe he is intentionally stymying the flow of Unkindled into the Shrine in order to prevent them from linking the fire, or maybe he is simply trying to ensure that only the worthiest Unkindled make it to Firelink.
But, isn't Ocelotte supposed to be a baby? Shouldn't he be half-dragon, like Oceiros? If he is half-dragon under all that armor, why does he erupt with the Pus of Man during battle?
Well first, let me lay down the background of my theory. Let's start with the Pus of Man. The Pus of Man is the name for the weird, mutated black serpent monster that erupts from Iudex Gundyr when he reaches half health. Its texture is reminiscent of the scintillating texture of Manus from Dark Souls 1, and its shape reminds me quite a bit of the Primordial Serpents. Given those attributes, it's not a huge leap to say that we should associate it with the Primordial Serpents, and therefore with the Abyss. The Grand Archives Key description states that, "with the fire fading, and the spreading pus of man tainting the castle, the Grand Archives closed its doors for good."
The Grand Archives is an interesting place, in this context. The description on Oceiros' soul reads "Oceiros went mad trying to harness his royal blood for a greater purpose, leading him to the heretics of the Grand Archives, where he discovered the twisted worship of Seath the paledrake." So we know that Oceiros, in order to infuse Ocelotte with the power of Seath, consulted the Grand Archives sages. We can infer, given the fact that the Pus of Man is hinted to have originated in the Grand Archives and that the Archive sages' worship of Seath was "twisted", that the dragon-hybrid research went horribly awry, resulting in the creation of the Pus of Man. It's also obvious that the Pus of Man can take control of dragons, as well as hollows. The two fire-breathing dragons at the Dragon Barracks bonfire confirm this, as they've been taken by the Pus. Maybe, finding that they could not meaningfully harness the power of Seath, the Archives sages settled instead for the power of Kaathe and his ilk. The fact that many of the books in the Grand Archives produce those weird, cursed hands suggests that those books are linked somehow to the curse - and therefore to the Abyss, and to Kaathe.
Now let's look at Oceiros a little bit closer. Oceiros is the former king of Lothric. He married the queen (who may have been Gwynevere, if the theories check out), and together they produced four children in an effort to conceive a suitable heir to link the fire: in no particular order - Lorian, Lothric, Gertrude, and Ocelotte. When the other 3 failed to link the fire, Oceiros resorted to drastic measures in order to ensure that Ocelotte would not. As a result of the Grand Archives' tampering, Ocelotte's soul would have been infused not with the power of dragons, but with the Pus of Man.
Champion Gundyr is, quite obviously, a prisoner of some kind. He was handed down some kind of "duty", as referenced in the description of his halberd, but he is also a literal prisoner, given that you can transpose the Prisoner's Chain from his soul. Here's where things get really foggy, but here is a potential timeline: Gundyr/Ocelotte was given his halberd to use on his journey to link the fire. However, once it was found out that he was an Abyss-corrupted abomination, he was locked away somewhere. As a result, he arrived to Firelink far too late to link the fire himself. He was killed by the player, but his Abyssal undeath brought him back to life, and he impaled himself on the Coiled Sword - maybe out of grief.
Soul of Champion Gundyr
One of the twisted souls, steeped in strength.
Use to acquire many souls, or transpose to extract its true strength.
Once, a champion came late to the festivities, and was greeted by a shrine without fire, and a bell that would not toll.
Ancient helm of a set of cast iron armor, belonging to Champion Gundyr. Modeled after a former king.
Gundyr, or the Belated Champion, was bested by an unknown warrior. He then became sheath to a coiled sword in the hopes that someday, the first flame would be linked once more.
Halberd of Gundyr the Champion, received when he was charged with his duty.
This old cast-iron halberd has the power to break poise, and is said to never crumble, seeming to suggest that Gundyr was fated to eternal service from the beginning.
Portion of a steel chain used to restrain Gundyr. Gain vigor, endurance, and vitality, but take extra damage.
A prisoner is one who has staked everything on a belief, a proclivity most apparent in the greatest of champions.