We report the detection of color gradients in six massive (stellar mass > 10^{10} M_{sun}) and passively evolving (specific SFR < 10^{-11}/yr) galaxies at redshift 1.3<z<2.5 identified in the HUDF using HST ACS and WFC3/IR images. After matching different PSFs, we obtain color maps and multi-band optical/near-IR photometry (BVizYJH) in concentric annuli, from the smallest resolved radial (~1.7 kpc) up to several times the H-band effective radius. We find that the inner regions of these galaxies have redder rest-frame UV--optical colors than the outer parts. The slopes of the color gradients mildly depend on the overall dust obscuration and rest-frame (U-V) color, with more obscured or redder galaxies having steeper color gradients. The z~2 color gradients are also steeper than those of local early-types. The gradient of a single parameter (age, extinction or metallicity) cannot fully explain the observed color gradients. Fitting spatially resolved HST seven-band photometry to stellar population synthesis models, we find that, regardless of assumptions for metallicity gradient, the redder inner regions of the galaxies have slightly higher dust obscuration than the bluer outer regions, although the magnitude depends on the assumed extinction law. The derived age gradient depends on the assumptions for metallicity gradient. We discuss the implications of a number of assumptions for metallicity gradient on the formation and evolution of these galaxies. We find that the evolution of the mass--size relationship from z~2 to z~0 cannot be driven by in--situ extended star formation, implying that accretion or merger is mostly responsible for the evolution. The lack of a correlation between color gradient and stellar mass argues against the metallicity gradient predicted by the monolithic collapse, which would require significant major mergers to evolve into the one observed at z~0. (Abridged)