Obama met with each family at Oak Creek High School, offering her condolences and concerns, a news release from the White House reported Friday.
A man idenified by authorities as Wade Michael Page shot and killed six people and critically wounded three others at the temple Aug. 5. Page killed himself after being shot by a police officer, police said.
"It's my honor to be here with you. I'm sorry it's under these circumstances, but I am anxious to meet with the families and lend whatever support I can," she said to temple secretary Kulwant Singh Dhaliwal and Oak Creek Mayor Stephen Scaffidi when they greeted her at the school, the release said.
Dhaliwal said he was touched by Obama's visit and concern for the victims.
"It was very graceful of her. It means a lot to us," he said.
Gurjeet Singh said his uncle Santokh Singh did not want to miss the event despite his lingering injury.
"He's very excited. He can hardly walk or stand because of the stitches, but we're going," Gurjeet Singh said.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Exploding whale video goes viral on Internet