In the 3-gauge theory, a 3-connection is given by a 1-form A valued in the Lie algebra g, a 2-form B valued in the Lie algebra h and a 3-form C valued in the Lie algebra l, where (g, h, 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 2form, the 2-curvature 3-form and the 3-curvature 4-form. The gauge configurations can be interpreted as smooth Gray-functors between two Gray 3-groupoids: the path 3-groupoid P3(X) and the 3-gauge group G L associated to the 2-crossed module L , whose differential is (g, h, l). The derivatives of Gray-functors are 3-connections, and the derivatives of lax-natural transformations between two such Gray-functors are 3-gauge transformations. We give the 3-dimensional holonomy, the lattice version of the 3-curvature, whose derivative gives the 3curvature 4-form. The covariance of 3-curvatures easily follows from this construction. This 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 {, }.