Although Hanuman had unfathomable strength he used to forget about this strength and powers when it was needed the most. There is an interesting story in the Ramayana that narrates about a curse on Hanuman which results in his forgetfulness.
This episode in the life of Hanuman is from his childhood
when his un-channelled energies as a child caused havoc in the world.
Hanuman was always up to some mischief. This greatly
disturbed the rishis engaged in austerities. They cursed him that he would
forget about his strength and would remember it only
when reminded by someone (Ramayana 7.36.28–36). Hence, on the eve of his
leaping across the sea to find Sita’s whereabouts, Jambavan had to remind him
of his strength.
Hanuman had received numerous boons from various Devas and
these included the boons of immortality, immunity against diseases as well as
various powerful celestial weapons, matchless strength, and wisdom.
It was these boons that Hanuman forgot due to the curse.