Concentration of sugar is more and inside the grape the concentration is low and through the semipermeable membrane of the grapes skin, the solvent moves from the lower concentration to higher concentration, thus making the grapes to shrink.
This process is called osmosis.