We present an analysis of the proper motion of the Andromeda galaxy (M31), based on the Early Third Data Release of the Gaia mission. We use the Gaia photometry to select young blue main sequence stars, and apply several quality cuts to obtain clean samples of these tracers. After correcting the proper motion measurements for the internal rotation of the M31 disk motion, we derive an apparent motion of 52.5 +/- 5.8 muas/yr with respect to the Gaia reference frame, or 61.9 +/- 9.7 muas/yr after applying a zero-point correction determined from quasars within 20 degrees from M31 and a correction from systemic biases. Accounting for the Solar reflex motion we deduce a relative velocity between Andromeda and the Milky way (in a non-rotating frame at the current location of the Sun) of 42.2 +/- 39.3 km/s along right ascension (40.0 +/- 39.3 km/s along galactic longitude) and -59.4 +/- 30.3 km/s along declination (-60.9 +/- 30.3 km/s along galactic latitude), with a total transverse velocity of V_trans = 82.4 +/- 31.2 km/s. These values are consistent with (but more accurate than) earlier Hubble Space Telescope measurements that predict a future merger between the two galaxies. We also note a surprisingly large difference in the derived proper motion between the blue stars in M31 and samples of red stars that appear to lie in that galaxy. We propose several hypotheses to explain the discrepancy but found no clear evidence with the current data to privilege any one of them.