The gunman was able to take a snub-nosed revolver past NASA security and barricade himself in the building, which houses communications and tracking systems for the space shuttle, authorities said.
NASA and police identified him as 60-year-old William Phillips. He had apparently had a dispute with the slain hostage, police said.
NASA spokesman Doug Peterson said the agency would review its security.
"Any organization would take a good, hard look at the kind of review process we have with people," Peterson said.
To enter the space center, workers flash an ID badge as they drive past a security guard. The badge allows workers access to designated buildings.
NASA identified the slain hostage as David Beverly, a civil servant who worked at the agency. Beverly, who was shot in the chest, was probably killed "in the early minutes of the whole ordeal," police said.
A second hostage, identified by NASA as Fran Crenshaw, escaped after being bound to a chair with duct tape, police Capt. Dwayne Ready said.
The gunman, an employee of Jacobs Engineering of Pasadena, Calif., shot himself once in the head more than three hours after the standoff began, police said. Initial reports indicated two shots were fired about 1:40 p.m. and another shot was heard about 5 p.m.
John Prosser, executive vice president of Jacobs Engineering, confirmed that the gunman was a company employee but declined to release any information about him.
Police said homicide investigators searched the gunman's house, where he lived alone, and found no guns or any evidence at all about the shooting. Police Chief Harold Hurtt said there was apparently a dispute between Phillips and Beverly, but didn't elaborate.
Beverly's wife, Linda, said he was an electrical parts specialist and had recently celebrated 25 years of service with NASA. She said her husband had mentioned Phillips to her before, but she declined to say in what regard. She said it wouldn't be fair to Phillips.
Mike Coats, the director of the Johnson Space Center, said Phillips had worked for NASA for 12 to 13 years and "up until recently, he has been a good employee."
During the confrontation, NASA employees in the building were evacuated and others were ordered to remain in their offices for several hours. Roads within the 1,600-acre space center campus were also blocked off, and a nearby middle school kept its teachers and students inside as classes ended.
Doors to Mission Control were locked as standard procedure.
NASA employees and contract workers were kept informed of the situation by e-mail.
Michael Zolensky, who studies cosmic dust, said workers were gathered around a television watching news reports of the situation.
President Bush was informed about the gunman as he flew back to Washington from an event in Michigan, White House spokeswoman Dana Perino said.
Jacobs Engineering provides engineering for the international space station, space shuttle and other spacecraft programs, and conducts research and development for new technology. In 2005, the company received a five-year contract with the space center worth up to $1.15 billion.