There are two versions of Gildas's life, which contradict each other. But they both keep bringing him together with Maelgwn.
In one, Gildas is sent as a child to study under St Illtyd in his monastery. It's the same establishment which received Maelgwn during his own ill-fated period of living under holy orders. Therefore, Gildas and Maelgwn were briefly fellow monks.
No doubt the son of Gwynedd's ruler was invaluable in facilitating any messages passing between the child and his Mum and Dad, back home on Ynys Mon. Could the sudden severing of that channel, when Maelgwn left the monastery, have left a lingering bitterness on the part of Gildas?
In the second version, Gildas didn't become a monk until he was in his thirties. He spent his childhood and young adult life on Ynys Mon, getting married and having children.
Except during Maelgwn's sojourn in the monastery, the two would have continued to live as neighbors. Gildas would have sworn fealty to Maelgwn, when the latter became ruler of Gwynedd and Ynys Mon, perhaps a decade or two before Gildas left to become a monk upon his wife's death.
Both versions explain how Gildas knew so much about Maelgwn's life, which he utilized to such searing effect in his sermon. He must also have been fully aware of the ruler's reputation, as a fierce and brutal warrior, used to enforcing his will. Being so far away in Brittany, the monk must have reasoned that he was safely out of reach from any retribution.
But Gildas was one of twenty-three children. Many of his siblings had established deep roots on Ynys Mon, raising their own families there, still under the protection of Maelgwn Gwynedd.
The eldest brother, Huail ap Caw, was dragged to Ruthin where he was beheaded over a large stone (Maen Huail), which can still be seen in the town's St Peter's Square.
The most commonly told version of the legend is that King Arthur executed him in a fight over a woman. Gerald of Wales wrote that Gildas then destroyed every document in Britain that mentioned Arthur, which is why none of them exist to verify his existence now. The lesser told story is that Maelgwn Gwynedd decapitated Huail - who had succeeded his father, upon the latter's death, as the head of his people - in lieu of his younger brother, following the publication of Gildas's sermon.
It's believed that another brother was captured by a band of Maelgwn's men and killed outright. They didn't deem it necessary to take him before their ruler for judgment.
Meanwhile, at least two more brothers were forced to flee Ynys Mon, with their families and any possessions that they could carry. Though history hasn't recorded any further details, I think we can assume that no descendant of Caw remained in Gwynedd in the aftermath of that.
Gildas's attack on Maelgwn Gwynedd made refugees of them all once more.