In Welsh mythology, Gwydion is a magician appearing prominently in the Fourth Branch of the Mabinogi and the ancient poem Cad Goddeu. He is the brother of Gilfaethwy and Arianrhod, and the nephew of Math fab Mathonwy. In the Mabinogion he is called the son of the goddess Dôn, making it likely he is an euhemerized god or demi-god. The name Gwydion may mean 'To Speak Poetry'.
In the Fourth Branch of the Mabinogi, Gwydion helps his brother Gilfaethwy rape Goewin, Math's foot-holder. To this end he steals Pryderi of Dyfed's pigs, thus forcing Math away to fight a war (Math only took his feet from his foot-holder's lap to go to battle). Gwydion and Gilfaethwy sneak back to Math's court where Gilfaethwy rapes Goewin. When Math hears of this, he turns his nephews into a series of mated pairs of animals; Gwydion becomes a stag for a year, then a sow and finally a wolf. Gilfaethwy becomes a hind deer, a boar and a she-wolf. Each year they produce an offspring which is sent to Math: Hyddwn, Hychddwn and Bleiddwn; after three years Math releases his nephews from their punishment.