A major road in Birmingham was closed for several hours after a boy was hit by a car, causing travel chaos for motorists.