Gruffydd ap Llywelyn (died 5 August 1063) was the King of Wales from 1055 to 1063. He was the son of King Llywelyn ap Seisyll. He was the great-great-grandson of Hywel Dda.
Gruffydd was the son of Llywelyn ap Seisyll, who had been able to rule both Gwynedd and Powys. On Llywelyn's death in 1023, a member of the Aberffraw dynasty, Iago ab Idwal ap Meurig, became ruler of Gwynedd and began his rise to power in Powys.
In 1039, King Iago of Gwynedd was killed (supposedly by his own men) and his son Cynan, who may have been as young as four, was forced into exile in Dublin. Gruffydd, who had already recovered Powys, expanded into the vacuum. Soon after gaining power, he surprised a Mercian army at Rhyd y Groes near Welshpool and totally defeated it, killing Edwin, brother of the Leofric, Earl of Mercia. He then attacked Dyfed, which his father had ruled but was now under Hywel ab Edwin. Gruffydd defeated Hywel in the Battle of Pencader (1041) and carried off Hywel's wife. Gruffydd seems to have been able to drive Hywel out of the south, for in 1044 Hywel is recorded returning to the mouth of the River Tywi with a Danish fleet to try to reclaim his kingdom. Gruffydd, however, defeated and killed him in a closely fought engagement.