First, we must acknowledge that it is not clear that leadership did help the United States win the Space Race. There is no objective way to prove that American leadership was better than that of the Soviet Union in any way that related to the Space Race. It is possible that the US won the Space Race because its democratic and capitalist system was simply more conducive to good science than the Soviet system.
If, however, we must say that leadership led to the US victory in the Space Race, we can point to John F. Kennedy. Kennedy famously challenged the United States, in 1961, to put a person on the moon before the end of the decade. It is possible to argue that, by doing so, Kennedy motivated the United States to put more resources into the Space Race. We can also say that Congress helped by putting more money towards education after the Soviets launched Sputnik. In these ways, we can say that the political leadership of the United States gave it the motivation and encouragement it needed to win the Space Race.