On an abstract level, the elliptic integral $K$ is an inverse of the elliptic functions which are doubly periodic (in the complex plane) with periods $K$ and $iK'$ (this in a sense answers your question).
To be concrete, one can answer your question given the integral representation you have given (setting $m=k^2$) for convenience. We are interested to know the value of the integral for $m_\epsilon = m \pm i\epsilon$ with $m>1$ and $\epsilon>0$. We can evaluate
$$\lim_{\epsilon\to0} K(m_\epsilon) = \lim_{\epsilon\to0} \int_0^{\pi/2}\!d\theta\,\frac{1}{\sqrt{1-m_\epsilon \sin^2 \theta}} = \underbrace{\int_0^{\theta^*}\!d\theta\,\frac{1}{\sqrt{1-m \sin^2 \theta}}}_{I_1}\pm i
\underbrace{\int_{\theta^*}^{\pi/2}\!d\theta\,\frac{1}{\sqrt{m \sin^2 \theta-1}}}_{I_2}$$
with $\theta^*=\arcsin(1/m^{1/2})$.
Now, we treat the two integrals separately. We perform the substitution $$ m \sin^2\theta = \sin^2 \theta'$$ and obtain
$$I_1 = \frac{1}{\sqrt{m}} \int_{0}^{\pi/2} \!d\theta'\,\frac{1}{\sqrt{1- m^{-1} \sin^2 \theta'}} = \frac{K(m^{-1})}{\sqrt{m}}.$$
Similarly employing the substitution $1- \sin^2 \theta =(1-m^{-1}) \sin^2 \theta'$ , we find that
$$ I_2 = \frac{1}{\sqrt{m}} \int_0^{\pi/2}\!d\theta'\,\frac{1}{\sqrt{1-(1-m^{-1}) \sin^2 \theta'}} = \frac{K(1-m^{-1})}{\sqrt{m}}.$$
Thus, we have that
$$ K(m) = \frac{1}{\sqrt{m}}\left[K(m^{-1}) \pm i K(1-m^{-1}) \right] . \tag{1}$$
The right hand side is the analytical continuation through the branch cut at $m>1$.
With the formula (1), you can find all the additional branches. E.g., at the point $m<1$ the right hand side becomes invalid but then using (1) you can find a the analytical continuation again.
To get a connection to your formula, you have to note that
$$ \frac{K(1-m^{-1})}{\sqrt{m}} = K(1-m)= K'(m).$$ Thus, we have that (for $m>1$ as before)
$$\mathop{\rm Im} K(m) = \pm K'(m)$$
and thus the branches differ by (even) multiples of $i K'(m)$. Similarly, by analytically continuing $K'(m)$ you observe that you get additional branches displaces by $K(m)$.
You find some more information e.g. here.