Even without the classification of finite simple groups, quite reasonable bounds are known, for example in work of P.M. Neumann. If the group $G$ can be generated by $r$ but no fewer elements, then no automorphism of $G$ can fix the $r$ given generators, so there are at most $\prod_{j=1}^{r} (|G|-j)$ different automorphisms of $G,$ since the $r$ generators must have distinct images, none of which is the identity. As P.M. Neumann has observed, $G$ can always by generated by ${\rm log}_{2}(|G|)$ or fewer elements, so we have $r \leq \lfloor {\rm log}_{2}(|G|) \rfloor .$ For $|G| >4,$ this always gives a strictly better bound for the size of ${\rm Aut}(G)$ than $(|G|-1)!.$ For large $|G|,$ it is much better. Using the classification of finite simple groups, much better bounds are known.
Later edit: Perhaps I could outline Neumann's argument, since it is quite elementary, and I do not remember a reference: Let $\{x_1, x_2, \ldots, x_r \}$ be a minimal generating set for $G$ and let $G_i = \langle x_1, x_2, \ldots, x_i \rangle $ for $i >0,$ $G_{0} = \{ e \}.$ Then for $1 \leq i \leq r,$ we have $|G_i| > |G_{i-1}|$ by minimality of the generating set. Furthermore, $|G_i|$ is divisible by $|G_{i-1}|$ by Lagrange's theorem, so $|G_i| \geq 2|G_{i-1}|.$ Hence $|G| = |G_r| \geq 2^r.$
Here's a proof, which is really an expansion of my comment above.
Let $A=\langle a\rangle$ be a cyclic group of order $n$, with $n$ odd. Let $K=\operatorname{Aut}(A)$, and consider the holomorph $G=A\rtimes K$. Because $n$ is odd, $Z(G)$ is trivial: because the inversion map is in $K$, we see that $C_G(a)=A$, and no element of $A$ is central. Also, since $K$ is abelian, we see $A=[G,G]$.
Now let $\phi$ be an automorphism of $G$. Then $\phi(A)=A$, and so there exists $k\in K$ such that $\phi(a)=a^k$. Now $H=\phi(K)$ is a self-centralizing subgroup of $G$ that is a complement to $A$. Because it's a complement, for every $g\in K$, there's a unique element of the form $a^?g\in H$. In particular, consider $\iota\in K$, the inversion map. If $a^r\iota\in H$, then setting $m=-r(n+1)/2$, it is easy to check that $\iota\in a^mHa^{-m}$. By looking at $[\iota,ga^s]$, we see that $C_G(\iota)=K$, and so $a^mHa^{-m}=K$. Thus $\phi$ acts on $G$ exactly like conjugation by $ka^m$, so $\phi$ is inner. Combined with the triviality of $Z(G)$, we see $G$ is complete.
Edit: I might have glossed over one too many details in the end above. Let $\psi\in\operatorname{Aut}(G)$ be conjugation by $ka^m$, and let $\alpha=\phi\psi^{-1}$. Then we've shown $\alpha$ fixes $A$ pointwise, and $K$ setwise. But then for any $g\in K$, we have
\begin{align}
a^g &= \alpha(a^g)\\
&= a^{\alpha(g)}
\end{align}
and thus $g$ and $\alpha(g)$ are two automorphisms of $A$ with the same action, meaning $\alpha(g)=g$. Thus $\alpha$ fixes $K$ pointwise, and since $G=AK$, $\alpha$ is the identity map.
Best Answer
No, your condition is not enough.
For example, take two distinct finite nonabelian simple groups $G$ and $H$ such that neither one is a subgroup of the other (such pairs exist; the condition is in fact stronger than it needs to be, as witnessed by the theorem quoted in the end; you just need $G$ and $H$ to be distinct). By the odd-order theorem, both $|G|$ and $|H|$ are even, so $\gcd(|G|,|H|)\neq 1$.
Let $\iota_G$ and $\iota_H$ be the inclusions into the product, and $\pi_G$, $\pi_H$ the projections. Let $f\colon G\times H \to G\times H$ be an automorphism.
Then $\pi_H\circ f\circ\iota_G \colon G\to H$ is a homomorphism. Since $H$ does not contain a subgroup isomorphic to $G$ and $G$ is simple, the composition must be the trivial map. Therefore, $f(g,e)\in G\times\{e\}$ for all $g\in G$. Symmetrically, by looking at $\pi_G\circ f\circ \iota_H$, we conclude that $f(e,h)\in \{e\}\times H$ for all $h\in H$. Therefore, $f|_{G\times\{e\}} = \alpha\in \mathrm{Aut}(G)$, and $f|_{\{e\}\times H} = \beta\in \mathrm{Aut}(H)$. So every automorphism of $G\times H$ corresponds to an element of $\mathrm{Aut}(G)\times\mathrm{Aut}(H)$, and of course the restrictions completely determine $f$.
You may want to consider:
Bidwell, J.N.S., Curran, M.J., and McCaughan, D. Automorphisms of direct products of finite groups, Arch. Math. (Basel) 86 (2006) no. 6, 481-489
Bidwell, J.N.S. Automorphisms of direct products of finite groups II. Arch. Math. (Basel) 91 (2008) no. 2, 111-121.
An example of a theorem of the first one is:
Theorem. Let $G=H\times K$, where $H$ and $K$ have no common direct factor. Then $\mathrm{Aut}(G)\cong \mathcal{A}$, where $$\mathcal{A} = \left.\left\{\left(\begin{array}{cc}\alpha&\beta\\\gamma&\delta\end{array}\right)\;\right|\; \alpha\in\mathrm{Aut}(H), \delta\in\mathrm{Aut}(K), \beta\in\mathrm{Hom}(K,Z(H)), \gamma\in\mathrm{Hom}(H,Z(K))\right\}.$$ In particular, $$|\mathrm{Aut}(G)| = |\mathrm{Aut}(H)||\mathrm{Aut}(K)||\mathrm{Hom}(H,Z(K))||\mathrm{Hom}(K,Z(H))|.$$