The massacre left 20 children and seven adults, including the gunman, dead. As many as 18 of the children were killed on the spot, while two others died in hospital.
Wiping tears from his eyes, Obama spoke about "overwhelming grief". He said: "Our hearts are broken for the parents of the survivors as well, for as blessed as they are to have their children home tonight, they know that their children's innocence has been torn away from them too early, and there are no words that will ease their pain." Obama paused frequently while speaking to maintain his composure.
He promised "meaningful actions" to prevent further similar tragedies.
"The majority of those who died today were children - beautiful little kids between the ages of 5 and 10 years old. They had their entire lives ahead of them - birthdays, graduations, weddings, kids of their own. Among the fallen were also teachers - men and women who devoted their lives to helping our children fulfil their dreams," Obama said.
US officials have not formally identified the gunman but said the 20-year-old's mother was working as a teacher at the same school.
The gunman, who has been identified as Adam Lanza in US media reports, is also thought to have killed his mother Nancy Lanza before the school attack. Adam's brother, Ryan Lanza, who was earlier believed to be the assailant, is also being grilled by the police, but has not been named as a suspect. His father, too, has been questioned by the police, said law enforcement officials.
The gunman was armed with several weapons, including semiautomatic pistols and semiautomatic rifles. The weapons were legally registered under the name of Nancy Lanza, said a US official.
Most of the victims are said to have been shot at point-blank range. The motive behind the attack is not yet clear and the gunman had no previous criminal record.
This is believed to be America's second deadliest attack after the 2007 Virginia Tech massacre, in which 32 people died.