A gram, abbreviated g, is a metric unit of mass used to weigh ingredients. A kitchen scale can measure liquids as well as solids by mass. Grams and milliliters are not generally interchangeable because ingredients have different densities.
Reference: NIST household measurements.