The battle originated when Amaethon stole a dog, a lapwing, and a roebuck from Arawn, the god of the Underworld (called Annwn). Robert Graves, who speculated that Bran and Arawn were names for the same Underworld god, wrote that the battle was probably not meant as a physical one but rather a struggle of wits and scholarship. Gwydion's forces could only be defeated if the name of his companion, Lady Achren was guessed (her name meant "Trees"), and Arawn's host could only be defeated if Bran's name were guessed (which Gwydion did).
The trees who fought in the battle were also part of the Druidic alphabet known as Ogham, where each sound is represented by a pattern of notches and a particular tree. Each tree had a meaning and significance of its own, which was why Gwydion was able to win the battle: he guessed Bran's name by the Alder branch Bran was carrying--the alder being one of Bran's prime symbols.