The boy reportedly pulled the gun, a .22-caliber pistol, out of his backpack during recess Monday morning.
"At recess, he pointed a gun to my head and said he was going to kill me," said Isabel Rios, one of the boy's fellow 6th grade students.
Granite School District officials say students didn't notify teachers about the weapon until 3 p.m.
"Once the teacher knew there was a weapon in the classroom, the student was apprehended in 30 to 45 seconds and immediately brought down to the office and the police were on site within five to 10 minutes," said Granite School District Spokesman Ben Horsley.
The boy was suspended and criminal charges may be filed.