Gravity causes erosion by pulling dirt, rocks and soil downward. For ex: as water mixes with dirt to form soft mud, the mud cannot support itself against the force of the gravity pushing down onto it.
Also gravity is the cause of precipitation and the water cycle, causing the rain causes dirt, rocks etc to be washed away.