If $(|G|, |H|) > 1$, does it follow that $\operatorname{Aut}(G \times H) \neq \operatorname{Aut}(G) \times \operatorname{Aut}(H)$? Let $G$ and $H$ be finite groups. If $|G|$ and $|H|$ are coprime, then 
$$\operatorname{Aut}(G \times H) \cong \operatorname{Aut}(G) \times \operatorname{Aut}(H)$$
holds. What about when $(|G|, |H|) > 1$? In this case we know that $\operatorname{Aut}(G) \times \operatorname{Aut}(H)$ is contained in $\operatorname{Aut}(G \times H)$, but the isomorphism above might not hold. For example $\operatorname{Aut}(C_2 \times C_2)$ has order $6$ but $\operatorname{Aut}(C_2) \times \operatorname{Aut}(C_2)$ is  trivial. 
Is the isomorphism possible at all when $(|G|, |H|) > 1$?
 A: It follows from the structure theory of automorphisms of direct products of finite groups that
$$|{\rm Aut}(G\times H)|=|{\rm Aut}(G)|\,|{\rm Aut}(H)|\,|\hom(G,Z(H))|\,|\hom(H,Z(G))|.$$
when $G$ and $H$ have no common direct factor. In particular, $\mathrm{gcd}(\left| G \right|, \left| Z(H) \right|)=1=\mathrm{gcd}(\left| Z(G) \right|, \left| H \right|)$ (along with the direct factor condition) is sufficient for ${\rm Aut}(G\times H)\cong {\rm Aut}(G)\times{\rm Aut}(H)$.
A: Let $g\in \operatorname{Aut}(G)$, $h\in \operatorname{Aut}(H)$, $f\in \operatorname{Hom}(G,H)$. Then we have an automorphism $(x,y)\to (gx\cdot fy, hy)$. Therefore if $\operatorname{Hom}(G,H)\ne 1$ then $\operatorname{Aut}(G \times H) \ne\operatorname{Aut}(G) \times \operatorname{Aut}(H)$.
A: No, it does not follow.
Let $G,H$ be two finite non-cyclic simple groups with $|G|,|H|$ both even (this in always holds) but not multiple of one another (for instance one can take $|G|=60$ and $|H|=168$). Clearly $2\mid\gcd(|G|,|H|)$, but the subgroups $G,H$ of the product group $G\times H$ are characteristic subgroups (stable under all automorphims), so that every automorphism of $G\times H$ comes from the automorphisms it induces in the factors $G,H$ separately. To see that the factor subgroups are characteristic, it suffices to consider the image of one factor, say $G$, by an automorphism, and then projected to the other factor, $H$. The result is  a subgroup of$~H$ isomorphic to a quotient of$~G$. But $H$ has no subgroup isomorphic to all of $G$ (consider the orders), and the only other quotient of $G$ is the trivial group (by simplicity of$~G$), so that is what the result is. This means that $G$ was stable under the automorphism. The same goes with $G$ and $H$ interchanged.
A: 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))|.$$
