I think that, in her youth (many thousands of years ago), Celestia married and had foals. Hell, she may have had many husbands over the millennia. As 'Great (x20) Grandmother is rather unwieldy, she refers to all the descendants of her various children as her nieces and nephews (such as Blueblood). However, I suspect the reason she calls Cadence her niece is because she's an alicorn and she prefers to act as if all the members of the Divine Race are kin.