So the way to understand Gaia's ability to detect M33 and its inability(?) to detect M31 is to realize that Gaia can't photograph a galaxy "all at once", but only "star by star" or "discrete light source by discrete light source". And M31 has too few sufficiently bright discrete light sources in order to show up clearly in Gaia's picture.

https://en.wikipedia.org/wiki/Triangulum_Galaxy wrote:
<<Star formation is taking place at a rate that is strongly correlated with the local gas density, and the rate per unit area is higher than in the neighboring Andromeda Galaxy. (The rate of star formation is about 3.40 Gyr−1 pc−2 in the Triangulum galaxy, compared to 0.74 in Andromeda.)>>