The mass of the Earth can be determined by the so called Cavendish experimentCavendish experiment. Henry Cavendish used an apparatus to determine the gravitational constant G which appears in the full equation for the gravitational force:
$$ F = {Gm_1m_2\over R^2} $$
where $m_1$ and $m_2$ are the masses of two objects, $R$ the distance between the centers of gravity of the objects and $G$ the gravitational constant (approximately $6.674 \times 10^{-11} \mathrm{N~m^2~kg^{-2}}$).
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).