The force of gravity is equal to Gm1m2/R^2 where G is the gravitational constant, m1 is the mass of the one body, m2 is the mass of the second, and R is the distance between the two centers. The force of gravity diminishes in strength proportional to the square of the distance between the two bodies. The Earth is just too small and too far away from our neighbouring planets, mars and venus, to gravitate towards them in any significant way. The moon, however, is close enough.

The acceleration of a body when a force acts upon it is equal to F/m where m is the mass of the body and F is the force acting upon it. The Sun and the Earth gravitate towards each other; however, the sun is so massive that the only apparent acceleration is that of the earth.