You see, here Seimei plays a role of Ame-no Uzume, and Ame-no Uzume indeed is a goddess)
This is a dance of a deceiving goddess: when legendary Amaterasu, the Sun goddess, was hiding in a cave, the earth and all living creatures struggled dwelling in darkness. Different gods came to that cave, and Ame-no Uzume, another goddess, tried to entice Amaterasu out of it; so she started her dance and stripped layer by layer out of her clothes. Amaterasu looked out, attracted by gods' laugh, and saw... her own face in a mirror held there specially for that purpose. She proceeded walking out step by step, and soon the Sun was up in the sky again.
In the story of Abe-no Seimei there's an episode when he needs help of Amaterasu, who is hiding again, this time in a giant egg. And Seimei decides to repeat Ame-no Uzume's famous dance (without stripping, for pity XD), so he dresses in female clothing, unleashes his hair and so on -- all that remaining a man)