I see that some years ago, I commented on the accepted answer (by @Clive Newstead) and said why it was incomplete. And there is an answer by @Ovi explaining why a common chain-rule theorem for limits doesn't apply. But no answer yet states a precise, true theorem about limits that does apply here to explain the answer. So let me fix that.
As Ovi noted, one theorem is that $ \lim \limits _ { x \to c } f ( g ( x ) ) = f ( w ) $ if $ w = \lim \limits _ { x \to c } g ( x ) $ exists and $ f $ is continuous there. This is completely inapplicable, since $ w $ is infinite in this case, and so there's no way that $ f $ could be continuous there; we can't even say that $ f $ is defined at $ w $.
But another theorem is that $ \lim \limits _ { x \to c } f ( g ( x ) ) = \lim \limits _ { u \to w } f ( u ) $ if $ w = \lim \limits _ { x \to c } g ( x ) $ exists (possibly as a form of infinity) and $ w $ is not in the range of $ g $ (including when $ w $ is a form of infinity), as long as $ \lim \limits _ { u \to w } f ( u ) $ also exists. And that's what we have here! (Actually, it's even possible for $ w $ to be in the range of $ g $ as long as there is a deleted neighbourhood of $ c $ on which it is not; that is, whenever there is a $ \delta > 0 $ such that $ g ( x ) $ is never $ w $ when $ 0 < \lvert x - c \rvert < \delta $.)
I should link to some reference where this theorem is stated, but I haven't found one, and writing out the general proof involves tedious cases. So instead, let me run through this example, showing how, given $ \epsilon > 0 $, to find $ \delta > 0 $ such that whenever $ 0 < x - 0 < \delta $, $ \lvert \arctan \ln x - ( - \pi / 2 ) \rvert < \epsilon $, without using any knowledge about arctangents and logarithms other than the two relevant limits and the fine print about the range.
So given $ \epsilon _ 1 > 0 $, since $ \lim \limits _ { u \to - \infty } \arctan u = - \pi / 2 $, there exists $ \delta _ 1 > 0 $ such that whenever $ 0 < - 1 / u < \delta _ 1 $, $ \lvert \arctan u + \pi / 2 \rvert < \epsilon _ 1 $. Now let $ \epsilon _ 2 $ be $ \delta _ 1 $; since $ \lim \limits _ { x \to 0 ^ + } \ln x = - \infty $ and $ \epsilon _ 2 > 0 $, there exists $ \delta _ 2 > 0 $ such that whenever $ 0 < x < \delta _ 2 $, $ 0 \leq - 1 / \ln x < \epsilon _ 2 $. So if we start with $ \epsilon = \epsilon _ 1 $, in the end we want $ \delta = \delta _ 2 $.
Let's check that ths works! So given $ x $ such that $ 0 < x < \delta = \delta _ 2 $, we know that $ 0 \leq - 1 / \ln x < \epsilon _ 2 $. Since $ - 1 / \ln x $ cannot equal $ 0 $ (in other words, $ - \infty $ is not in the range of the natural logarithm, which is less trivial when you apply this reasoning to finite limits), in fact $ 0 < - 1 / \ln x < \epsilon _ 2 = \delta _ 1 $. Let $ u $ be $ \ln x $; since $ 0 < - 1 / u < \delta _ 1 $, $ \lvert \arctan u + \pi / 2 \rvert < \epsilon _ 1 $. In other words, $ \lvert \arctan \ln x + \pi / 2 \rvert < \epsilon $, which is what we need.
tl;dr: $ \lim \limits _ { x \to c } f ( g ( x ) ) = \lim \limits _ { u \to w } f ( u ) $ if $ w = \lim \limits _ { x \to c } g ( x ) $ exists (possibly as a form of infinity) and $ w $ is not in the range of $ g $ (including when $ w $ is a form of infinity), as long as $ \lim \limits _ { u \to w } f ( u ) $ also exists. (And it's also OK if $ w $ is in the range of $ g $ because $ g ( c ) = w $ and/or because $ w = g ( x ) $ for values of $ x $ far from $ c $. And finally, if $ f $ is continuous at $ w $, as already noted, then no conditions apply to the range of $ g $.)