Longitudinal and transverse magnetostrictions of the antiferromagnetic compound UNiGa were measured at 4.2 K on a single crystal in a magnetic field applied along the c axis. The metamagnetic transition in the vicinity of 1 T field causes a contraction of the crystal along the c axis by 2.1×10-4 and an expansion along the a axis by 1.0×10-4, with negligible volume effect owing to cancellation of the linear strains. The magnetostriction has a large field hysteresis. The width of the hysteresis depends strongly on the rate of field variation, ranging from 0.3 T in a steady field to 1.4 T for dB dt = 3 T ms-1, indicating a large magnetic viscosity of the compound.