According to the Hanes Taliesin, Gwion Bach ap Gwreang was from Llanfair in Caereinion in Powys, and was forced by Cerridwen to stir the Cauldron of Inspiration for a year and a day while she brewed a magic potion of inspiration. At the end of the year, the three drops of inspiration lept out of the potion, burning Gwion's thumb, which he promptly stuck in his mouth. This caused him to become enlightened with all knowledge. Cerridwen chased him through various animal transformations until swallowing him as a grain, and then giving birth to him, at which point he was renamed Taliesin--the Shining Brow.

The story of Gwion Bach is similar to that of how Fionn found knowledge; under the tutelege of Fintan, young Demne watched over the cooking of the Salmon of Knowledge; fat from the fish struck Demne on the thumb, which he quickly put in his mouth out of instinct. Demne became enlightened and was renamed Fionn--"fair".

When Fionn would need to think, he would put his thumb in his mouth, in a rite called imbas forosnai. This is alluded to in Gwion's act of sticking his thumb in his mouth, causing enlightenment, but there is no futher reference to imbas forosnai in the stories of Taliesin.

NOTE
In an earlier version of this entry, I wrote that "Fionn/Finn is essentially the same word as Gwion/Gwyn, both meaning 'fair' with, at least in the Welsh, the implication of 'blessed.'" This is not true, as Christopher Gwynn noted on a language mailing list. The pronuciations are different: "Fionn" is pronoucned "fin" while "Gwion" is pronoucned "GWEE-awn". The name Gwion is actually a modern version of a name found in both the Book of Taliesin and the Book of Aneurin--Gwiawn.