its simple, if the gravity of the sun was not acting on the earth, the earth wud have travelled in a straight path, but due to the perpendicular force of the sun acting on it it takes a circular path.
U are already aware of the theory, just apply it here.