5. In $\triangle A B C$, $A B<B C<C A$, and $A C-$ $A B=2, A D$ is the angle bisector of $\angle B A C$, $E$ is a point on side $A C$, and line $B E$ intersects $A D$ at point $G$, and $\frac{A C}{C D}=\frac{A E}{B D}=$ $2, \frac{A G}{G D}=2007$. Then the length of side $B C$ is $(\quad$.
(A) 2008
(B) 2007
(C.) 2006
(D) 2005
5.B.

As shown in Figure 4, draw $EF \parallel AD$ intersecting $CD$ at point $F$, and let $AB = x$. Then,
$$
\frac{AC}{AE} = \frac{CD}{DF} = \frac{CD}{BD}.
$$

Since $BD = DF$, $DG$ is the midline of $\triangle BEF$. Therefore, $BG = GE$. Also, $\angle BAG = \angle EAG$, so $AB = AE = x$. Thus, $CE = AC - AE = AC - AB = 2$.
Since $EF \parallel AD$, we have $\frac{AE}{DF} = \frac{CE}{CF} = \frac{AC}{CD} = 2$.
Hence, $DF = \frac{x}{2}$, $CF = 1$.
And $\frac{EF}{AD} = \frac{CE}{AC} = \frac{2}{AE + CE} = \frac{2}{x + 2}$

and $\frac{EF}{AD} = \frac{2GD}{AG + GD} = \frac{2}{\frac{AG}{GD} + 1} = \frac{2}{2008}$, so $x = 2006$.
Therefore, $BC = 2007$.