Witnesses described the chaos as workers fled a building at the Washington Navy Yard when a gunman opened fire.