Mr. Obama called on Americans to raise their voices against gun violence that has rattled the nation several times during his time in office, saying it "falls upon us to make it different."
The president said change will not come from politicians in Washington. Instead, he said change will have to come the only way it ever has - from people demanding action.
Mr. Obama and first lady Michelle Obama also visited with the victims' families before the memorial, which was held at the historic Marine Barracks in Washington, D.C.
The shooting last Monday left a dozen people dead. Suspected gunman Aaron Alexis, 34, was killed in a gun battle with police.
The Associated Press contributed to this report.