The fact that $Z(G)$ is a group and hence $|Z(G)|$ divides $|G|$ (by Lagrange) gets you halfway there: $|Z(G)|$ can't be equal to $|G|$ since $G$ is non-Abelian so it must be at most half of $|G|$.
To get the other factor of two, we use the fact that $Z(G)$ is normal in $G$, so that their quotient group is well-defined. Then we can be more refined in our use of Lagrange's theorem.
The order of $G / Z(G)$ is $\frac{|G|}{|Z(G)|}$, so if $|G| < 4|Z(G)|$ then Lagrange's theorem shows this quotient group has either $1,2$ or $3$ elements. The first case contradicts the assumption that $G$ is non-Abelian. The second two cases, being prime orders, imply that $G / Z(G)$ is cyclic.
But if that's the case, then there is some $g \in G$ such that $gZ(G)$ generates $G / Z(G)$. Now pick an arbitrary $x \in G$. Since the cosets of $Z(G)$ partition $G$, we find $x$ in $g^k Z(G)$ for some $k \in \mathbb{N}$. Of course it follows that $x$ itself is in the center of $G$.