There was a much bigger return that what you are implying here. Not only did it give us more information on out solar system (especially the origin of the moon), it employed thousands of scientists, engineers, machinists, draftsmen, carpenters, welders, (my list could go on for days), etc. Not only did this support an entire infrastructure (which paid taxes back into the Gov) in produced spin-off technologies and businesses that are still employing people to this day. On a purely financial basis, the space program was a success. Don't forget the technological leaps that were the result of our endeavors as well. NASA did help win the cold war.
Seriously, read Bastiat, that which is seen and that which is not seen if you haven't done so already. He addresses this a lot more succinctly than I can (but still kind of long). You are looking at that which is seen. However, the lost opportunity costs are not seen and you don't address those.