The moon does fall towards the earth because of gravity. That is why it does not move in a straight line, rather in a circular orbit. The main point to note is that as the moon has some tangential velocity, the gravitational force acting on it just changes the direction of motion at each and every instant of time.