Personally I think it would need to be in the 1930's, namely Glushko not denouncing Korolev resulting in him ending up in the Gulag. I still think the Americans would have been first anyway but the USSR would have had a better chance had those two been working in unison.
They actually did work together, and quite well, during the 1950s (forgive and forget, apparently; and in any case Glushko ended up in the GULAG as well). However, there were some incidents related to the choice of propellant for the N-1 that led to their splitting. You can't forget that there were other important designers like Chelomei and Yangel as well, they were not just two-bit players next to Korolev and Glushko.
Fundamentally, though, the problem was one of management, not technical capability; unlike the US, there was no top-level control of the space program. Imagine you had Boeing, McDonnell Douglas, Lockheed, and so on competing not just for contracts for the vehicles, but for whose space program would actually be adopted, with no actual NASA. It would be total chaos! That was pretty much how the Soviet program was being "run". Add on a lack of top-level support for the program (Khrushchev just wanted spectaculars, Brezhnev didn't give a damn, the whole shebang was being run as part of the military, and a part that (unlike in the US) didn't care about space), and the seeds of failure were sown in the 1950s. It's probably
possible for the Soviets to beat the US to the Moon, but a lot of the changes you would have to make would have undesirable knock-on effects.
EDIT: So it would go from a "more successful Soviet space program" TL to a "different Soviet politics (with a more successful Soviet space program" TL. Which would still be fairly novel--most of the political TLs we see around here are US-centric, like RogueBeaver's--but perhaps requires a different focus.