I really want to say that if the Soviet Union had beaten Apollo 8 in a lunar circumnavigation mission and beaten Apollo 11 in a manned lunar landing that it would have launched a permanent moonbase race, a race for a Mars flyby mission, and/or a race for a manned Mars landing between the United States and the Soviet Union. But I really don't believe this would have happened.
Valentin Glushko, the head of NPO Energia, tried to generate interest in a permanent Soviet moonbase in the mid-1970s saying that the Soviets could win a moonbase race. He was told to give up this fantasy and work on projects in the national interest.
Even before Apollo 11 landed on the moon, the Congress was cutting NASA's budget that would lead to the cancellation of Apollo 18, 19, and 20.
The country was more concerned with the Vietnam War and Johnson's Great Society social programs. Some in congress began to view the manned space program as an expensive stunt that had very little return, scientific or otherwise, to justify the expense and there were those in NASA itself who believed that unmanned robotic missions had a greater scientific return and could be performed more cheaply. They believed that manned missions drained the majority of resources and got in the way of performing real science.
I believe that the Apollo missions would have flown and the United States would have launched Skylab.
The Soviet Union could congratulate itself on being the first to the moon. But on the whole, nothing would have changed.