No, grams are a measurement of *mass*, not weight. Weight is the force of gravity *acting* on a mass, such that F=mg (where g is the acceleration due to gravity, and is approximately 9.81 m/s^2 at sea level ). That is in the unit of Newtons.
The thing is though that g is only really variable by non-negligible amounts at very large distances, so for most purposes we just treat g as the above value on Earth. And if g is approximately constant for most uses, the main relevant variable in most cases is mass.
So the short version is that they are *technically* two different things, but for most purposes here on earth the main thing that changes with weight is mass, so sometimes people just sort of equate the two.
Latest Answers