It's actually true that $M$ is complete if and only if its universal cover $\widetilde{M}$ is complete. Let $p: \widetilde{M} \to M$ be the universal covering map, $q \in M$ and $\tilde{q} \in p^{-1}(q)$. As has already been stated, by Hopf-Rinow, all we need to if we want to conclude that $\widetilde{M}$ implies $M$ is complete is prove the corresponding statement for the exponential maps based at $q$ and $\tilde{q}$.
Now if $\widetilde{M}$ is complete and $\widetilde{E}: T_{\widetilde{q}}\widetilde{M} \to \widetilde{M}$ is its exponential map based at $\widetilde{q}$, define a map
$$ E = p \circ \widetilde{E} \circ (dp)^{-1}: T_qM \to M$$
You can show that $p$ sends geodesics to geodesics by showing their images are locally length minimizing. Since $(dp)^{-1}$ is linear it sends radial lines to radial lines, and you can use this to show that $E$ is exactly the exponential map for $M$ based at $p$. Then from the above it follows immediately that $E$ is defined on the whole tangent space.
The other answer shows the reverse implication.
That this problem illustrates that for some Riemannian manifolds $(M, g)$ the length-minimizing paths are not geodesics.
Example (Up to reparameterization) the only geodesic that passes through $(\frac{\pi}{2}, 0)$ and $(\frac{\pi}{2}, \frac{5\pi}{4})$ is the preimage of the the equator, that is, $t \mapsto (\frac{\pi}{2}, t)$, but the length of this geodesic between those two points is $\frac{5 \pi}{4}$, which (as the problem shows) is larger than the diameter $\pi$ of $M$, hence it is not length-minimizing.
(In fact, for this particular example there are pairs of points that are not connected by any geodesic, despite that the space is connected.) Indeed, this reinforces the point that geodesics are locally length-minimizing, but globally they need not be. (There are simpler examples of this fact, too: For any nonantipodal points $x, y \in S^n$, the minor and major arcs of the great circle passing through them are both geodesics, but the major arc is longer than the minor arc and hence not minimizing.)
Hint The key observation is that the metric in the preimage of the polar regions is small, so a strategy for building a short path between two points is to travel from your starting point to that region, do your lateral movement there, and then drop down to the point of interest.
Additional hint Suppose we want to travel from $(a, b)$ to $(a', b')$. Then we have at least one of $a + a' \leq \pi$ or $(\pi - a) + (\pi - a') \leq \pi$, and by symmetry (reflection $M$ across the preimage of the equator) we may as well assume the former. Consider the path $\gamma_\epsilon$ defined to be the concatenation of the paths $\gamma_\epsilon^1$ connecting $(a, b)$ vertically (along a "meridian") from to $(\epsilon, b)$ where $0 < \epsilon \leq \min\{a, a'\}$, $\gamma_\epsilon^2$ connecting $(\epsilon, b)$ horizontally (along a "parallel") to $(\epsilon, b')$, and $\gamma_\epsilon^3$ connecting $(\epsilon, b')$ to $(a', b')$ vertically. Then, length of $\gamma$ satisfies \begin{align}L(\gamma_\epsilon) &= L(\gamma_1) + L(\gamma_2) + L(\gamma_3)\\ &= (a - \epsilon) + |b' - b| \sin \epsilon + (a' - \epsilon)\\ &\leq (a + a') + (|b' - b| - 2) \epsilon \leq \pi + (|b' - b| - 2) .\epsilon\end{align} So, the distance from $(a, b)$ to $(a', b')$ satsfies$$d((a, b), (a', b')) = \inf_\gamma L(\gamma) \leq \inf_{\epsilon > 0} L(\gamma_\epsilon) \leq \pi ,$$ where in the second expression $\gamma$ varies over all curves from $(a, b)$ to $(a', b')$. But those points were arbitrary, so $$\operatorname{diam}(M, d) = \sup d((a, b), (a', b')) \leq \pi ,$$ where the supremum is taken over $M \times M$. To show equality, by definition we need to produce sequences $(a_i, b_i)$ and $(a_i', b_i')$ such that $$\sup_i d((a_i, b_i), (a_i', b_i')) = \pi .$$ Of course, it would suffice to find points $(a, b), (a', b')$ such that $d((a, b), (a', b')) = \pi$. One such pair is $(\frac{\pi}{2}, 0)$ and $(\frac{\pi}{2}, \pi)$.
Best Answer
Let $\mathbb{S}^n$ be the $n$ dimensional sphere, $N = (0,\ldots,0,1)$ its north pole and $S$ its south pole. Let $g$ be the usual round metric on $\mathbb{S}^n$. Then $\left(\mathbb{S}^n \setminus\{N\},g\right)$ is a Riemannian manifold.
Suppose $v$ is a unit tangent vector at $S$. Define $$ \forall t \in \left(-\pi,\pi\right),~\gamma(t) = \cos t \cdot S + \sin t \cdot v $$ Then $\gamma$ is a geodesic. It goes "out" of $\mathbb{S}^n\setminus\{N\}$ in finite time (at $t = \pi$).
Now, let $f : \mathbb{S}^n\setminus\{N\} \overset{\sim}{\to} \mathbb{R}^{n+1}$ be the stereographic projection. It is a diffeomorphism, which allow us to push forward the metric $g$ on $\mathbb{R}^{n+1}$, say $h = f_*g$ (or $h = (f^{-1})^*g$), so that it becomes an isometry.
Being an isometry, $f$ maps geodesics to geodesics, and thus, $f\circ \gamma : \left(-\pi,\pi\right) \to \mathbb{R}^{n+1}$ is a geodesic. It goes to infinity in finite time ($t = \pi$).
Remark that if $(M,g)$ is a connected Riemannian manifold and if $x \in M$, then $(M\setminus\{x\},g)$ cannot be complete. Any geodesic of $M$ passing through $x$ can be viewed, by a sort of local stereographic projection, as a geodesic in $M\setminus\{x\}$ going out of $M\setminus\{x\}$ in finite time. Here, the stereographic projection identify $x$ with "infinity".