How is it possible that the CMB approaches the earth from all directions? I presume that the photons from the CMB approach the earth from all directions, otherwise we couldn't detect them with a picture where it is present everywhere in the universe with a tiny anisotropy.

Now the CMB is a result of the big bang. Another result of the big bang is that in all directions we see galaxies moving away from us, like we are in the center of the universe (which is probably not the case).

But why are all the galaxies (except a few) moving away from us while the CMB is approching us. What is the reason for that difference? Or aren't those photons coming from everywhere?
You are comparing apples and oranges. The CMB is like the light from a distant galaxy, which while the galaxy is receding the light approaches us. CMB is the light emitted by universe at recombination. The matter that emitted the CMB is/was receding from us with a very high red-shift.