One of the injured students was in critical condition, Robinson said.
The shooting at Arapahoe High School in Centennial, Colo., sent hundreds of students fleeing in terror as others huddled in locked classrooms for more than an hour, waiting for police to give them the all-clear, the Denver Post reported.
Robinson said the gunman, 18-year-old Karl Halverson Pierson, was found dead, apparently of a self-inflicted gunshot wound.
"This is an unspeakable horror and something no child, no family should have to endure," Gov. John Hickenlooper said. "Our thoughts and prayers are with the Arapahoe High School community and those affected by this senseless act of violence."
The incident began at 12:33 p.m. MST and lasted about 14 minutes.
Robinson told a news conference the gunman entered the school from the west and confronted a specific teacher. When a student confronted the gunman, Robinson said he was shot and critically wounded. A second student suffered a minor gunshot wound.
"We heard one shot and then two shots," one student told ABC news.
"I was scared and shaking," another student told the Post. She said she was on the floor by the time the third shot rang out.
Students were locked in rooms for about an hour as police secured the building. Later they were seen walking from the school with their hands in the air. Police blocked roads leading to the campus and all schools in the district were placed on lockdown along with those in nearby Aurora and Douglas counties.
The school, built in 1964, has a student population of more than 2,000 and is part of the Littleton Public Schools system.
Arapahoe is about 10 miles from Columbine High School in Littleton where Eric Harris and Dylan Klebold killed 12 students and one teacher in April 1999. It also is south of Aurora, site of the July 2012 movie theater massacre where 12 people were killed and 58 wounded.
The shooting comes just one day shy of the one-year anniversary of the Sandy Hook Elementary School shooting in Newtown, Conn., where 20 children and six teachers were shot to death.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards