I've read quite a bit about the Space Race, but it is never clearly mentioned why the Soviet Union managed to fail in their attempt to land on the moon first, despite beating the US in every other race (first satellite, first man in space, first spacewalk, etc.). Was it a downfall on their part? Or did the US really just step it up?
You can read Boris Chertok for a comprehensive history of the Soviet Space Race, but it can be summarized like this: The Soviet leadership kept asking for space victories (the early space race victories until 1965), which resulted in delays and routing of resources from the "Sever" program (which became the Soyuz) and significantly delayed the capsule and lander for the Moon program. There were also serious complications due to infighting and rivalry between the different design bureaus. This is why the N-1 rocket was developed, instead of creating the UR-700 by adding a stage to the existing UR-500 (the modern "Proton" is an UR-500 with an extra stage).
Finally, we don't fully know about the priorities of the Soviet space program. For example, the "Almaz" space station was later declassified to have a spy station for high definition photography on board. The Soviet leadership may have simply decided that the resources were better spent competing with similar American spy satellites/stations instead of the Moon program.
Bottom line, mismanagement and factors that we may not know about yet.
hi! there have been a few discussions on the "Space Race" and the Soviet space program in general; check out this section in the FAQ*
Soviet objectives in space exploration
*see the link on the sidebar or the wiki tab
The USSR beat the US at many intervals, but the US wasn't far behind. The US's first manned flight was within a year of the Soviets, for instance. The US achieved orbital rendezvous and docking first, which was key in actually going to the moon. The US was also the first in the pre-lunar trips, so they were the first to orbit the moon with a manned spacecraft too.
But the big hurdle was developing a heavy lifter, which was essential for reasons I outlined here. The Saturn V developed by the US successfully brought large payloads to space, whereas the Soviet N1 never had a successful launch. Without it, a lunar mission was practically impossible.