CCTV footage reveals the heart-stopping moment the child attempts to board a train at Cronulla, in south-east Sydney.
The terrifying incident took place as the boy alongside his grandparents and sister attempted to board the carriage, moments before the train is due to leave.
But the little boy, dressed in shorts and a t-shirt, misjudges the distance between platform and train.
The boy’s grandfather gets on his hands and knees to rescue the child
The CCTV shows the child fall straight into the gap between the train and platform, his tiny body sliding in between the two.
Immediately his grandfather begins to shout and wave for help as the boy’s grandmother also tries to signal the train guard.
She leaves the train to try to get help as the boy’s grandfather gets on his hands and knees to rescue the child, who is wedged between the carriage and platform.
The boy is seen walking toward the train with his family
The little boy is seen attempting to board the train
The grandfather manages to pull the child to safety and is seen hugging him tightly as the boy puts his feet back on the platform.
A worker from Sydney Trains is seen rushing over to check on the boy and to ask what happened.
The child appears to be shaken but unhurt by the ordeal, which took place last year.
Get Quotes on Home Insurance
The boy slips down the gap between the train and platform
The boy's grandparents frantically signal for help
It comes after footage of a toddler trapped under train in China went viral.
A three-year-old girl was caught on camera falling off a platform at Xinjing City railway station in China’s Qinghai province.
The youngster was walking near the platform edge with her mum and was seen playfully running towards the train when she slipped down the gap.
The boy's grandfather gets on his hands and knees to rescue the child
The boy is pulled out from between the train and platform
Her mother is seen frantically calling for help as two passengers jump into the gap to lift the girl to safety as station workers tell the driver not to start the train.
A crowd of 15 people were seen helping lift the child off the track.