The mass of the Earth can be determined by the so called Cavendish experiment. Henry Cavendish used an apparatus to determine the gravitational constant G which appears in the full equation for the gravitational force:

    F=G*m1*m2/R^2

where `m1` and `m2` are the masses of two objects, `R^2` the distance between the centers of gravity of the objects and `G` the gravitational constant. 

As the diameter of the earth is known, as well as the gravitational constant, determining the gravitational force on an object with known mass gives us the mass of the object exerting that force (so the Earth).