The gunman, a longtime public utilities employee, was also killed after trading fire with responding officers, police chief James Cervera told a news conference on Friday.
The shooting happened just after 4 pm (local time), when the gunman entered one of the buildings at the Virginia Beach municipal complex and "immediately began to indiscriminately fire on all of the victims," Cervera said.
The wounded included a police officer, who was saved by his bulletproof vest.
The building where the shooting took place in Virginia Beach, a city on the east coast of the US about 200 miles (320 kilometers) southeast of Washington, housed the city's public works and utilities offices.
(story provided by news agency PTI)
WATCH: All you need to know about Modi cabinet's first decisions