I'm not sure about the anime, since I don't watch it, but in the games, the following legendaries have genders:
Latias (Always Female)
Latios (Always Male)
Cresselia (Always Female)
Heatran (50/50)
Torndadus (Always Male)
Thunderus (Always Male)
Landorus (Always Male)
Kubfu (87.5% Male, 12.5% Female)
Urshifu (87.5% Male, 12.5% Female)
I didn't know this until I looked it up. The only legendaries I knew had genders were the Eon Duo, Cresselia, and Heatran.