The suspected gunman, shot and killed by Secret Service agents, was known to the Secret Service and had been instructed to stay away from White House grounds, officials said.