The Brythonic name of the Gododdin capitol was Din Eidyn (Fort of Eidyn). According to the Annals of Ulster, it was beseiged in AD 638, which is the traditional date for the loss of the kingdom to the Angles of Bernicia, who rendered the name as Edin-burh or Edinburgh. In this view of Castle Rock, one appreciates the precipitous crag that served as the stronghold of the native Britons.
The earliest mention of Arthur may be in Y Gododdin, a collection of elegies commemorating the fallen heroes of a battle fought circa AD 600 at Catraeth. Thought to derive from the Latin cataracta, or waterfall, which also gave its name to Cataractonium, a Roman fort there, the site has been identifed with Catterick in the northern Yorkshire Dales between the kingdoms of Bernicia and Deira. Catraeth eventually was lost to encroaching Anglo-Saxon settlers from Deira and incorporated into the expanding kingdom of Northumbria.
Although the individual verses, themselves, do not tell what happened, the story can be inferred. Having been feasted for a year at Din Eidyn, waiting for a suitable moment to attack, 300 retainers of Mynyddog the Wealthy, chief of Gododdin (the name both of the kingdom and the tribe who inhabited it), rode south to confront the Angles at Catraeth. There, the warband encountered no fewer than 54,000 of the heathen enemy and was annihilated.
Of the fallen warriors, one is praised as having glutted ravens on a fortress rampart, "though he was no Arthur" (B.38). Ascribed to the bard Aneirin, who traditionally is said to have flourished in the last half of the sixth century, two independent versions of this early Welsh heroic poem eventually were recorded: a more complete A text and an archaic B text, each with variants between and within themselves. They survive in a unique manuscript from the mid-thirteenth century known as the "Book of Aneirin," which, inevitably in the hundreds of years that the contemporary songs of battle were transmitted orally before being written down, has misplaced stanzas and later interpolations. The question is whether the reference to Arthur as a paragon of martial prowess is one such scribal addition or whether it is part of the original oral tradition. Because the reference to Arthur appears only in one version of Y Gododdin, the scholarly consensus is that what would otherwise have been the earliest reference to Arthur is a later interpolation.
That the versions of Y Gododdin do not agree can be seen in the number of men who are said to have fought and survived the battle. In one verse of the A text, 300 men fought, only one of whom escaped. Another verse says that 363 fought and that three men survived, as well as the poet, himself, "with my blood streaming down, for the sake of my brilliant poetry." The "three men and three score and three hundred wearing gold torques" is likely an interpolation, as evidenced by its use of multiples of threes, 363 = (3 x 1) + (3 x 20) + (3 x 100). Three survivors, rather than one, probably can be contributed to the same convention. Nennius uses triads, as well, in describing the 960 slain by Arthur in his last battle at Badon, that is, three three-hundreds and three twenties.
The Gododdin are said to have fought against 100,000 Anglo-Saxons, which obviously is a poetic exaggeration. The B text says 54,000, "nine score around each one," that is, 180 against every one of the 300 Britons. Since such odds are not credible, it has been assumed that the 300 retainers were, themselves, chiefs, each with their own contingent of foot soldiers. And, indeed, a verse does speak of "men cut down in England before the three hundred chiefs." More likely, a disciplined force of 300 cavalry are meant, including infantry. Several verses refer to leaders having "a hundred men" and it may be that as many as 3,000 warriors confronted the Anglo-Saxons at Catterick.
References: The Gododdin: The Oldest Scottish Poem (1969) by Kenneth Hurlstone Jackson; Aneirin: Y Gododdin: Britain's Oldest Heroic Poem (1988) by A. O. H. Jarman; The Gododdin of Aneirin: Text and Context from Dark-Age North Britain (1997) by John T. Koch.