"Space science, like nuclear science and all technology, has no conscience of its own," he said in a 1962 speech at Rice University in Houston. "Whether it will become a force for good or ill depends on man, and only if the United States occupies a position of pre-eminence can we help decide whether this new ocean will be a sea of peace or a new terrifying theater of war."
But even Kennedy was less of an enthusiast than he led the nation to believe. In a 1962 audio tape from the Oval Office, later discovered by the staff of the John F. Kennedy Library in Boston, he brushed off suggestions from NASA's then-chief James Webb that the space program should be about more than beating the Soviet Union to the moon.
"This is important for political reasons, international political reasons, and this is, whether we like it or not, an intensive race," Kennedy is heard saying on the tape.
"Otherwise, we shouldn't be spending this kind of money, because I'm not that interested in space."
President Kennedy was "not that interested" in space? Every president since has found lukewarm support.
"I don't think it's changed particularly," said Roger Launius, a senior curator at the Smithsonian Institution's National Air and Space Museum and former chief historian at NASA. Polls have consistently shown about 60 percent of the American people support the space program -- though the number always drops into the 40s when people are asked about the cost.
"We like it," said Launius. "We just don't want to pay for it."
NASA has a frequent answer to its critics: that even at $20 billion a year, it consistently spends less than half of 1 percent of the federal budget; that space exploration has led to thousands of technological spinoffs and employed hundreds of thousands of Americans; and that even if the money were diverted to tackling social problems, it would not solve them.
Launius said the arguments fall flat with many people. When historians try to understand great missions of exploration, he said, "We're essentially reduced to four 'G' words: God, Gold, Glory, and Geopolitics." Nations send out explorers when they want power or material return. "Right now, we don't have that."
Polls show Americans have warmed over time to the memory of Apollo. Since 1979, the number of people saying the moon landings were worth the cost has risen from 41 percent to 65. Launius says there is not organized opposition to the space program, the way there is to other efforts; there just isn't ringing support. Millions of Americans still question Kennedy's decision.
So we come back to his famous 1962 speech at the Rice University football stadium.
"But why, some say, the moon? Why choose this as our goal? And they may well ask, 'why climb the highest mountain? Why, 35 years ago, fly the Atlantic? Why does Rice play Texas?'"
The crowd roared.
"We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard," Kennedy said, "because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win."
ABC News polling director Gary Langer and The Associated Press contributed reporting for this story.