There are very few countries in the world now that do not use the metric system. Last I looked it was three: the USA, Liberia, and Myanmar.
China is regarded as a metric country. Over the years, they've had a number of standards of measurement. Big shakeups occurred in 1915, 1930, and again in 1959.
Regarding weight, Chinese do have grams and kilograms.
公克 (Gōngkè) is the formal word for "gram".
公 (Gōng) is really the word for "public", and 克 (Kè) basically means "gram". So it's not surprising that it's often used without 公 (Gōng).
Kilograms are a bit different though.
公斤 (Gōngjīn) is the formal word for "kilogram".
However, while the first character still means "public", 斤 (Jīn) doesn't mean "kilogram". It actually means "half a kilogram" or 500g.
斤 (Jīn) is basically the modern equivalent of the old Chinese pound (which was slightly heavier). It is still very commonly used when buying things like vegetables. Instead of buying 1.5 kilograms, you'll hear people order 3 jin.
You'll also often hear 斤 (Jīn) called another name that sounds like "catty". This is what it's called in Hong Kong and Macau, and so the name also ends up all over the country.