Yes, it is believed that Hanuman ji once ate the Sun. This story is found in 'Valmiki Ramayana' and other Puranas. In this story, the amazing powers of Hanuman ji in childhood have been described.
The story of Hanuman ji swallowing the Sun:
- Once Hanuman ji felt very hungry.
- He mistook the Sun shining in the sky as a red fruit.
- He flew into the sky to eat the Sun.
- Due to his divine power, he moved rapidly towards the Sun and tried to swallow it.
- This caused darkness in the entire universe.
- This story is understood from the mythological point of view.