A gram is smaller than an ounce. There are approximately 28.35 grams in each avoirdupois ounce and approximately 31.10 grams in each troy ounce. The gram is a standard unit of measurement in most countries, and is defined as being 1/1000 kilogram.
In most cases, avoirdupois ounces are used. These are part of the system in common use in the United States. Troy ounces are used to measure precious metals and are not commonly used as a measurement outside of the commodities market. The United States is the only major market that still uses the ounce as an official unit of measure.