Two claims about Hanuman's origins get repeated confidently and neither is secure.
The first is that he descends from Vrisakapi, a divine monkey mentioned in Rigveda 10.86. The hymn is an odd one, a dialogue involving Indra, his wife Indrani and this figure, and the connection to Hanuman has been proposed. It is not established, the character is different, and the safe statement is that Vrisakapi is a distinct figure who has sometimes been linked to Hanuman rather than an early form of him.
The second is that Hanuman is the source of the Chinese Sun Wukong, the Monkey King of the sixteenth-century Journey to the West. The suggestion is old, made by Hu Shih among others, and it was answered by Lu Xun, who argued for an indigenous Chinese origin in the water-demon Wuzhiqi. Buddhist transmission gave a plausible route, and there are shared elements, and the question has never been settled. Anyone stating flatly that Sun Wukong is Hanuman is going beyond the evidence.
What is clear is his parentage within the Indian material. He is the son of Vayu, the wind, which is why he flies, and this makes him half-brother to Bhima of the Mahabharata, who is also Vayu's son. The two meet: in the Mahabharata's third book, Bhima comes upon an old monkey lying across a path and tells him to move his tail, and cannot lift it. The scene is a joke at the expense of the strongest of the Pandavas, and it puts Hanuman inside an epic set long after his own.
He is also one of the clearest cases of a figure who crosses the sectarian lines. He is served in Rama temples as an attendant and in his own temples as a deity in his own right, he is regarded in some Shaiva traditions as a form or son of Shiva, and he is invoked for entirely practical purposes, against illness, against the planet Shani, and for courage, by people who would not describe themselves as devotees of anyone in particular.