Galaxies are moving apart, but not because they're moving through space. They're simply being carried along with the expansion of space, under the influence of dark energy. But this moving apart applies to galaxies that are already a considerable distance away. At relatively close distances, the gravitational attraction between galaxies may be stronger than the influence of dark energy and so they may actually be getting closer together. Thus the Andromeda Galaxy and the Milky Way Galaxy are moving together, on a collision course.
Think of a loaf of raisin bread. As it rises, each raisin moves farther from every other raisin. An observer on one of the raisins would see every other raisin moving away, and the farther away a raisin was, the faster it would move away. The nearest raisin might appear to move hardly at all, while the farthest raisin might move several inches in the same amount of time. And yet the raisins (galaxies) do not move through the dough (space), they are simply being carried along with it.
The speed of light of a galaxy moving away from us does not change. Rather it is stretched out, so that its frequency decreases and moves toward the red end of the spectrum. This effect is called a "red shift" and is evidence, discovered by Edwin Hubble, that red-shifted galaxies are moving away from us and the farther away a galaxy is, the more it is red-shifted and thus the faster it is moving away.
Einstein's speed limit of the speed of light applies to objects, including galaxies, moving through space. It does not apply to the expansion of space itself, which may expand at any speed. Thus the galaxies at the edge of the visible universe are being carried away from us at faster than the speed of light. Once they exceed the speed of light, the light they afterwards emit will never reach us. Thus more and more galaxies will disappear from view. In effect, they cross the boundary between the visible universe and the universe beyond, which some say is infinite.
Dark matter was proposed as a way of explaining the behavior of stars within galaxies and of nearby galaxies to each other. The amount of gravity required for that behavior was far more than could be accounted for by ordinary (visible) matter. While the gravity of ordinary matter and dark matter together is enough to hold groups of galaxies together, it is still less than the force of dark energy. If dark matter were evenly scattered through the universe, dark energy could perhaps be overcome. But dark matter is evidently clumped here and there along vast filaments, along with the clumping of galaxies.
Of the total energy of the universe, ordinary matter contributes about 5 percent, dark matter about 27 percent, and dark energy about 68 percent. Dark energy wins.