Magic and symbolism are closely related in Yeats's poetry, as Yeats regarded poetry as a kind of magic and was also very much a symbolist when it came to his poetic craft.
In a letter to the Irish nationalist John O'Leary, Yeats stoutly defended his devotion to magic, which he saw as being at the very heart of his creative life. Simply put, without his extensive study of magic, Yeats believed that he would not have been able to create anything. As he told O'Leary, the mystical life was at the center of all he did, thought, and wrote.
Kathleen Raine, a poet deeply influenced by Yeats, put it very succinctly when she said that for Yeats, poetry was a kind of magic, as it attempted to give humans a form of higher knowledge that transcended normal human consciousness.
That being the case, it is not surprising that Yeats should've based so many of his poems around esoteric symbols that he created to give access to a different world of meaning, a world that transcended the here and now.
For Yeats, symbols had a life of their own outside the human mind. They occupied a transcendent realm, and as such needed to be invoked by the poet, acting as a kind of seer, just as a magician would invoke a magic spell in order to bring something from the world beyond to the imminent world in which we live our everyday lives.
In writing his poetry, Yeats fervently believed that he was using magical powers, roughly corresponding to what others might call poetic inspiration, to conjure up striking symbols upon which he could build poems and convey his esoteric, mystical ideas.