Without overtly saying it, the Soviets too were aiming for the moon. It was only after it was clear they lost that they decided they never were even trying.
Also Gemini was post-Kennedy speech and developed to test the techniques needed for Apollo.
The problem they had was a large engine, was not something in house, and was harder to develop than expected. So for the N-1 launcher (Their answer to the Saturn-V) instead for 5 F-1 engines (about 1.5 million lbs thrust) they used 30 (!!!) NK-15s with about 370,000 lbs thrust. (In fact those engines are now being used on Antares! Just renamed to NK-33. Some seem to have actually been built back then for the N-1!).
The F-1 development was very hard, but the US succeeded. And with only 3 stages, and 5 large engines on the first stage, it was possible to launch.
The N-1 with 30 engines on the first stage, and 5 stages in total (A sure sign you lost the design battle is more stages) had all sorts of issues with interactions between so many engines, and due to political pressures was forced to test in all up configuration, with insufficient ground testing to work out those interactions. Thus it failed on all 4 launch attempts.
This is often used as a critique of the SpaceX approach where Falcon 9 is approaching that level of interaction, and Falcon Heavy with 27 main engines even more so.
Of course, that ignores the causes of the Soviet failures (insufficient ground testing before launch attempts) and just focuses on the numerical number of engines.