We report the spin texture formation resulting from the magnetic dipole-dipole interaction in a spin-2 $^{87}$Rb Bose-Einstein condensate. The spinor condensate is prepared in the transversely polarized spin state and the time evolution is observed under a magnetic field of 90 mG with a gradient of 3 mG/cm using Stern-Gerlach imaging. The experimental results are compared with numerical simulations of the Gross-Pitaevskii equation, which reveals that the observed spatial modulation of the longitudinal magnetization is due to the spin precession in an effective magnetic field produced by the dipole-dipole interaction. These results show that the dipole-dipole interaction has considerable effects even on spinor condensates of alkali metal atoms.