South Wales Police said a slow-moving vehicle collided with the child at Heol y Felin in the town at about 13:05 BST on Monday.
The boy was taken by ambulance to the University Hospital of Wales, Cardiff, where he is in a stable condition.
Police are appealing for witnesses. The air ambulance was sent but it was decided to take the boy to hospital by road.
A boy is being treated in hospital after he was struck by a car in Neath.