Suppose the Soviets had managed to get their moon rocket working
and had made it first.  They could have beaten us if either:

* Their rocket hadn't blown up on the pad thus setting them back,

and/or

* A Saturn V went boom.

If they had beaten us, I speculate that the US would have gone
head and done some landings, but we also would have been more
determined to set up a base (both in Earth Orbit and on the
Moon).  Whether or not we would be on Mars by now would depend
upon whether the Soviets tried to go.  Setting up a lunar base
would have stretched the budgets of both nations and I think
that the military value of a lunar base would outweigh the value
of going to Mars (at least in the short run).  Thus we would
have concentrated on the moon.
