Answer:
In addition to slowing the overall expansion, gravity causes local clumping of matter into stars and galaxies. ... Once objects are bound by gravity, they no longer recede from each other. Thus, the Andromeda galaxy, which is bound to the Milky Way galaxy, is actually falling towards us and is not expanding away.