There are several legends regarding the birth and relationships of Ganga. Most acceptable versions say that when Lord Brahma washed the holy feet of Lord Vamana, Ganga was born and was brought up in Satyaloka, the abode of Brahma. Some other texts eg Skanda Puran says that Ganga was the first daughter of Himaavan, the Lord of Mountains, and elder sister to Parvati. This is little contradictory with the first one in the sense that Lord Vamana manifested in Satya Yuga, while Adi-Shakti manifested as Parvati in the beginning of Treta Yuga.
The version which speaks of her 'human' birth in the house of Himaavan, depicts her as an arrogant and short-tempered girl, who ascends to heaven at the request of the Gods. Her arrogance is broken only when Lord Shiva traps her in His locks and the touch of Shiva purifies her so that she in turn can purify the three worlds.
Now coming to her marital status. In Chapter 2.6 Hymns 13-95 of the Brahma Vaivarta Purana, it is stated
that Lord Vishnu has three wives, namely Lakshmi, Ganga, and Saraswati.
All the three wives love Vishnu dearly and fight for his attention at
all times. In order to do so effectively, they proclaim their respective
supremacy over the other, which leads to quarrels. Due to their
constant quarreling amongst each other, finally Vishnu keeps Lakshmi for
himself, and gives Ganga to Shiva and Saraswati to Brahma. Ganga is also sometimes referred to as Vishnupriya, the beloved of Vishnu.
Ganga serves as the mother of Ganesha and the foster-mother of
Kartikkeya and hence is also known as the spouse of Shiva. Ganga's
residence in the matted locks of Shiva further gives her the place as
the second wife of Shiva besides Uma, who happens to be Ganga's sister,
as they both are daughters of King Himaavan. Thus, in the Skanda Purana,
Shiva is married to both the sisters, Ganga and Uma. That's why she's known as Harapriya, the beloved of Shiva while Ganesh is known as Gangeya - the son of Ganga.
In a regional tale, when the demons Madhu and Kaitabh were killed by Vishnu, they asked a boon from him prior to their death - they wished to be reborn as Vishnu's devotees. They were reborn as Mallasura and Manisura. They obtained boons of invincibility from Vishnu and began to torture and kill the Rishis. To kill them, Lord Shiva manifested as Khandoba, while Parvati manifested as his wife Mhalsa and Ganga manifested as his lover Banai.
I find Ganga strangely linking the Trimurti. She's born from Brahma's Kamandalu, touches Vishnu's feet and rests in Shiva's locks. She's the daughter of Brahma and the ambiguous second consort of both Shiva and Vishnu. However there is no text actually depicting Ganga's marriage with any God or directly referring her as anyone's wife (unless we consider her marriage with Shantanu). So who do you guys think was Ganga's husband and father?