Students and staff were among the victims, state police Lt. Paul Vance said a brief news conference. He also said the gunman was dead inside the school, but he refused to say how people were killed.
Stephen Delgiadice said his 8-year-old daughter was in the school and heard two big bangs. Teachers told her to get in a corner, he said.
"It's alarming, especially in Newtown, Connecticut, which we always thought was the safest place in America," he said. His daughter was fine.
Andrea Rynn, a spokeswoman at the hospital, said it had three patients from the school but she did not have information on the extent or nature of their injuries.
Mergim Bajraliu, 17, heard the gunshots echo from his home and ran to check on his 9-year-old sister at the school. He said his sister, who was fine, heard a scream come over the intercom at one point. He said teachers were shaking and crying as they came out of the building.
"Everyone was just traumatized," he said.
Richard Wilford's 7-year-old son, Richie, is in the second grade at the school. His son told him that he heard a noise that "sounded like what he described as cans falling."
The boy told him a teacher went out to check on the noise, came back in, locked the door and had the kids huddle up in the corner until police arrived.
"There's no words," Wilford said. "It's sheer terror, a sense of imminent danger, to get to your child and be there to protect him."
The White House said Barack Obama was notified of the shooting and his spokesman Jay Carney said the president had "enormous sympathy for families that are affected."