King Shantanu was not just a normal king. He had divinity in him.
In his previous life, he was called Mahabhisha, a king of the Ikshvaku dynasty. He performed many Ashwamedha Yagnas and 100 Rajasuya yagnas in his previous life and after his death, attained heaven. Once there was a meeting held in Brahma's court, to which all devatas and Ganga attended. Mahabhisha was also called there.
When they were worshipping Brahma, a mild wind blew and Ganga's saree got displaced. Everyone bowed their heads except Mahabhisha who was staring at her body. Brahma was enraged to this and cursed him to be born on earth, while protecting his divinity.
As a result he was born on earth. Though a man, he would help the devatas in waging wars against the asuras and would often visit Indra. Hence the devas respected him. The fact that he married ganga itself states that he is not a normal human.
So when Bhishma pledged that he would never marry for his father's sake, he could grant him a boon through the divinity he had.