Tyler Roffey
Nursery pupil Tyler Roffey told his teacher he was going to the toilet, before walking three-quarters of a mile from Ashleigh Primary School to his home in Oakleigh Road.
His mother Sara McGuire said she was now considering taking Tyler out of the school if security was not improved.
The school said it was shocked by the "unfortunate incident" and had now installed a new, locked, gate.
Ms McGuire had dropped Tyler off at school in the morning and expected to pick him up at 3.15pm. But at 1.45pm, Tyler appeared at the back door of their home.
She said: "I felt sick when I found out what had happened. He should not be able to get out of school that easily.
"Luckily I was at home that day and Tyler is a sensible child, pressing the button at the road crossing and waiting for the green man but it could have been much worse.
"I took him straight back to class but the security just isn't good enough.
"Both Tyler and his twin brother, Leo, currently attend the school but I am seriously considering pulling them both out and moving them to a different school unless something is done."
Shortly after the incident, Ms McGuire decided to test the school's security.
"I managed to get on to the school grounds, wander around the playground and school field near the nursery and no one asked who I was or why I was there. You expect your children to be safe at school. I could have been anyone," said.
Head teacher Mark Henderson said the safety of his pupils was paramount.
"This was a very unfortunate accident and we were shocked when we found out," he said.
"Tyler had gone to the toilet and the staff noticed he was absent two minutes later and let me know straight away.
"Together we carried out a full search of the school within three minutes of him leaving the classroom.
"Schools are not prisons and if the security of children is too intense it would not be conducive to learning.
"Since the problem we have installed a new gate with a high latch, put a combination lock on our current gates and ordered new ones too.
"I have met Tyler's parents on two occasions since the incident and both times she said she felt reassured by the action taken by the school.
"She also commented on the nature of her son and that she had trouble at home keeping him in the house."