The child was pulled into the space between the wall and the bars of the gate and was subsequently crushed.
The process took less than 45 seconds to occur and the automated gate had no safety devices to protect people from injury as it opened.
It took bystanders five minutes to free the child and he was rushed to Middlemore Hospital after he was released from the gate.
The boy was not conscious following the incident and had a large injury on his head.
WorkSafe said if bystanders did not intervene, the child could have been crushed to death.
WorkSafe recommendations:
• Signage warning people to keep clear when they are activated.
• Flashing beacon devices to warn of impending gate movement.
• A pressure sensor for the gate's leading edge.
• An emergency stop button, programmed with momentary reverse.
• Have clearly labelled emergency gate releases.
• Install a torque-limited device to limit the moving force of the gate.