By Agence France-Presse
The gunman, a longtime public utilities employee, was also killed after trading fire with responding officers, police chief James Cervera told a news conference.
The shooting happened just after 4 pm (2000 GMT), 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.