  In the $3$-gauge theory, a $3$-connection is given by a $1$-form $A$ valued
in the Lie algebra $ \mathfrak g$, a $2$-form $B$ valued in the Lie algebra
$\mathfrak h $ and a $3$-form $C$ valued in the Lie algebra $ \mathfrak l $,
where $(\mathfrak g,\mathfrak h, \mathfrak l)$ constitutes a differential $
2$-crossed module. We give the $3$-gauge transformations from a $3$-connection
to another, and show the transformation formulae of the $1$-curvature $2$-form,
the $2$-curvature $3$-form and the $3$-curvature $4$-form. The gauge
configurations can be interpreted as smooth $\mathbf{Gray}$-functors between
two $\mathbf{Gray}$ $3$-groupoids: the path $3$-groupoid $\mathcal{P}_3(X)$ and
the $3$-gauge group $ \mathcal{G}^{\mathscr L}$ associated to the $ 2$-crossed
module $\mathscr L$, whose differential is $(\mathfrak g,\mathfrak h, \mathfrak
l)$. The derivatives of $\mathbf{Gray}$-functors are $3$-connections, and the
derivatives of lax-natural transformations between two such
$\mathbf{Gray}$-functors are $3$-gauge transformations. We give the
$3$-dimensional holonomy, the lattice version of the $3$-curvature, whose
derivative gives the $3$-curvature $4$-form. The covariance of $3$-curvatures
easily follows from this construction. This $\mathbf{ Gray}$-categorical
construction explains why $3$-gauge transformations and $3$-curvatures have the
given forms. The interchanging $3$-arrows are responsible for the appearance of
terms concerning the Peiffer commutator $\{,\}$.
