Eight-year-old Stacey Wakeford had been taken to Royal Glamorgan Hospital by her mother after the schoolgirl had fallen in the playground.
Stacey from Treherbert, in the Rhondda, has now undergone a life-saving operation to remove the tumour from the back of her head.
Michelle and Jason Wakeford believe the tumour would have gone unnoticed until it was too late had it not been for the Stacey's accident.
For months, she had complained of headaches and was taken to the doctor for a check-up.
But the pains in her head were linked to her eyesight and Stacey was sent to an optician.
It was only when Stacey was taken to hospital three weeks ago after her accident that the full picture emerged.
Doctors became concerned when Stacey collapsed at the hospital and she was given a brain scan.
She was then transferred to the University Hospital of Wales in Cardiff, where a surgeon from the Great Ormond Street Children's Hospital in London performed an operation to remove the tumour.
Stacey has been allowed home in time to celebrate Christmas with her family.
'Little gem'
She will continue to undergo treatment for the tumour and pay regular visits to hospital.
Her mother said: "I think it was divine providence that we took her to the hospital after she fell in the street because I think it saved her life."
Head teacher of Penyrenglyn Junior School, John Griffiths, where Stacey is one of the 142 pupils, said she had been in school today to hand out Christmas cards to her friends.
He said: "She is a little gem. She looked extremely well considering what she's been through.
"It was very serious and everyone is very grateful that she's on the mend.
"When we were told she had a brain tumour I went quite weak at the knees and my legs were like jelly. Within a small community like this everybody is affected."