Washington Mayor Vincent Gray also called for action, saying "our country is drowning in a sea of guns."
The service ended with a bugler playing taps and a reading of the names of the fallen. They ranged in age from 46 to 73 and included civilian employees and contractors. A bell sounded as each name was read.
Peggy McFarland, 56, attended the ceremony and said she agreed with the president's words. McFarland, who works in building 197 where the shooting took place and said she always greeted the security guard Richard Ridgell who was killed, said she too is frustrated by gun violence.
"I think that we shouldn't accept this as the norm," she said, echoing the president, and adding, "It can't be like this."
Associated Press writers Nedra Pickler, Philip Elliott and Stacy A. Anderson contributed to this report.
Follow Jessica Gresko on Twitter: https://twitter.com/jessicagresko