He said he shared hugs and tears and vowed that “out of darkness a brighter day is going to come”.
Mr Holmes is alleged to have opened fire during a packed midnight screening of The Dark Knight Rises before being detained outside the cinema.
He said: “You see young people who have come in and just two days ago or 36 hours ago or even 24 hours ago, it wasn’t certain whether they would make it and now suddenly their eyes are open, they are alert, and they are talking and it reminds you that even in the darkest of days… life continues.”
Mr Obama added: “I confessed to them words were inadequate but my main task was to serve as a representative of the entire country and say we are thinking about them at this moment each and every day.”
The president said he had shared hugs and tears, but also laughter as the families recounted the lives of their loved ones.
Mr Oates said: “As awful as what they’ve been through and what they’re going through has been, having the president here is very, very powerful.”
Both Mr Obama and his Republican Party challenger, Mitt Romney, curtailed their election campaigns in the wake of the Aurora attack, dropping advertising in Colorado state out of respect for victims and their families.
People have been laying flowers at a memorial site near the Century cinema.
Thousands of people have also been gathering outside City Hall for an emotional vigil for the victims.
Police and army officers, and other officials were loudly applauded as they approached the stage.
Aurora Mayor Steve Hogan told the crowd: “While our hearts are broken, our community is not.”
Colorado Governor John Hickenlooper refused to mention Mr Holmes by name, saying the priority was the 12 victims.
He said: “July 20th should never be about remembering the killer, it should be about remembering those individuals, remembering those victims. So I ask you to help me here.”
As he then read out the names, the crowd chanted, “We will remember,” after each.
Mr Obama’s visit comes a day after police cleared James Holmes’s flat of explosives which could have killed people entering via the door.
The FBI is now collecting evidence from the flat of Mr Holmes, who is accused of at least 12 counts of first-degree murder.
Investigators say a computer found inside his home could provide crucial details.
Booby traps connected to explosives had prevented police from entering it for two days until they made the devices safe.
Police said the suspect had acted with “calculation and deliberation”, taking ammunition deliveries for months.
James Holmes is due to appear in court on Monday.
Authorities have established no terrorism link, nor any motive. Mr Holmes had no criminal record other than a speeding fine.
It has emerged that Mr Holmes tried to join a Colorado gun range last month but owner Glenn Rotkovic told Associated Press he warned staff not to accept him after hearing a “bizarre – guttural, freakish at best” message left by Mr Holmes on his voicemail.
The Arapahoe county coroner Michael Dobersen has released the names of the dead.
He said all the deaths were related to gunshot wounds.
The dead include a six-year-old girl and two US military servicemen.
“But I think, as is evidenced by everyone who is here today, all those who were here yesterday, and all the messages of support that we have received from literally around the world, we can I think now start this process of grieving and healing.”