I think they would have eventually. Their N1 program faced technical challenges both before and after Apollo 11 landed on the moon on July 20, 1969.
N1 Launch Attempts |
Feb 21st, 1969 |
July 3rd, 1969 |
June 26th, 1971 |
Nov 23rd, 1972 |
Aug 1974 (Canceled) |
The N1 program started almost 4 years after the Saturn V, so until around 1973, it could be argued that the Soviet program was still "keeping pace" with the American program. But by 1974, in light of the USA's success a full five years earlier, it might have started seeming to the Soviet leadership that the N1 program was becoming a bit of an embarrassment. The N1 program was suspended in May of 1974 and officially canceled in 1976.
However, the Venera program involved 16 separate probes which were sent to Venus from 1961 through to 1983. This program demonstrates that the Soviets were willing to persevere despite repeated failures.
I think that if Korolev had lived, under his leadership the N1 might have been successful by its fourth launch. That would probably have given the Soviet leadership the reassurance they needed to continue funding the program in 1974.