Police say the girl ran out between two parked cars outside Crofton Infants’ School on High Street, Crofton, just before 9am.
Officers said the driver managed to stop as the car made contact with the youngster, who was not injured in the incident.
It happened as police in Wakefield continue to clampdown on parents who park illegally or dangerously during the school run.
Insp Ian Williams, Wakefield Police’s neighbourhood inspector, said: “She was in her first week at nursery and was walking to Crofton Infants’ School when she ran into the road between two parked cars.
“Thankfully the driver reacted very quickly and the impact was very slight causing no injury.
“The cars were legally parked, although their presence had restricted the flow of traffic to a single lane.
“There is no indication that the driver was at fault in any way and by all accounts reacted very quickly. Speed was not a factor.”
“This highlights the fact that children do not perceive danger and need protection.
“Some parents continue to park inconsiderately and in some cases dangerously.
“Together with Wakefield Council we are continuing with our daily operation to combat this issue.”
Police in Wakefield are visiting up to four schools a day immediately before and after they open and close.
Insp Williams added: “There will be a zero tolerance approach to offences.
“In addition, we continue to work with the highways department and schools to educate parents through their children and find alternative means of getting children to school safely, such as walking buses.
“So far this week we have issued 18 tickets to parents.
“ I would like to thank parents, schools and locally elected members for their continued support in what we are trying to achieve.”