I can only recommend reading your state's law, and following it very carefully. Here in Virginia, the current law appears to allow a person to have a gun under the circumstances you mention, but only under specific conditions (see the paragraph on exceptions, below):
§ 18.2-308.1. Possession of firearm, stun weapon, or other weapon on school property prohibited; penalty.
A. If any person knowingly possesses any (i) stun weapon as defined in this section; (ii) knife, except a pocket knife having a folding metal blade of less than three inches; or (iii) weapon, including a weapon of like kind, designated in subsection A of § 18.2-308, other than a firearm; upon (a) the property of any public, private or religious elementary, middle or high school, including buildings and grounds; (b) that portion of any property open to the public and then exclusively used for school-sponsored functions or extracurricular activities while such functions or activities are taking place; or (c) any school bus owned or operated by any such school, he is guilty of a Class 1 misdemeanor.
The law does have exceptions in sub-para C:
The provisions of this section shall not apply to... (vi) a person who possesses an unloaded firearm that is in a closed container, or a knife having a metal blade, in or upon a motor vehicle, or an unloaded shotgun or rifle in a firearms rack in or upon a motor vehicle; (vii) a person who has a valid concealed handgun permit and possesses a concealed handgun while in a motor vehicle in a parking lot, traffic circle, or other means of vehicular ingress or egress to the school...
A gray area might exist if you are on a public street adjacent to the school when you let the child out of the car. I wouldn't dare provide legal advice on this or any other area -- if in doubt, consult an attorney who specializes in this area of your state's laws. There might also be, at least under Virginia law, a gray area concerning what is meant by a "closed container," but again, consulting an attorney might reveal how actual case law defines it.