I've heard the story that the soviets were kicking US butt until about 1967 when the US blew past them with the help of Gemini rockets. Soviets couldn't compete.
US landed on the moon. Won the race. End of story.
Except...
I've also heard that the Soviets had half the budget of the US, and weren't even trying to put a man on the moon. They opted for a space station, and were the first country to do that...which we never learn about, of course.
Current Space exploration is based on satellites and manning space stations, not putting people on planets.
Were the Soviets smarter (and more efficient) in their approach? And did the US "win" if winning is defined by a goal that the Soviets were not even trying to achieve? A goal that ended up not being as important, technologically speaking, as the Soviet goal?
The US space program put a team of astronauts on the closest celestial body, a huge achievement and impressive to anybody. However, the Soviet space program made most of the major milestones before the Americans could. First unmanned object, first animal, first human, first spacewalk (I think), and first space station. Much of this has to do with the Nazis both the US and USSR took home to jumpstart their respective space programs. The US had many of the lead scientists, the ones who planned, calculated, made blueprints, and oversaw the building of rockets. The USSR had many of the technicians, the ones who had hands on experience building rockets.
This is a gross oversimplification, but bear with me. The Soviets had a lead on the Americans because they could start making rockets faster, because they had many of the building crews. Just scale up the design and you have a rocket that will work. However, since the US had more of the designers and thinkers, they were able to make different models and anticipate issues more readily.
To conclude in a gross oversimplification , a large part of the space race was determined by the captured Nazis. This is not all of the story. Economics, technology, pride, and mechanical failures are also factors here. Ones that I can't answer as well as I'd like.