Is the equational theory of groups axiomatized by the associative law?
Yes. It suffices to show that any free semigroup embeds in a group.
For this I refer you to MO question 3235:
Let $F$ be a free semigroup (say, $2$-generated) which is embedded in a group $G$, and suppose that $G$ (as a group) is generated by $F$. The most simple such situation would be when $G$ is a free group, but there are lot of groups, besides free ones, which could occur in this situation (for example, $G$ could be solvable).
The title should read " Is the equational theory of (the class of those semigroups which are groups) axiomatized by the associative law?", and the answer given by Bjorn Kjos-Hanssen makes even more sense (and seems more immediate): Take any free group on a set X of generators, and consider its semigroup reduct. The set X generates a subsemigroup S of this reduct, which is free (in semigroups) on X. (If it weren't, the words in X would be identified in the free group.) So any hope of finding a nontrivial semigroup identity in the equational theory of this class is toast.
Gerhard "Please Pass The Butter Knife" Paseman, 2019.08.31.