It means that the net content will not fluctuate by more than five grams.
±5 grams means 5g more or less than the standard mass. This describes a range that is allowed within plus or minus 5.
"±" means positive or negative. The positive and negative signs can be used in mathematics to represent the positive and negative of rational numbers or to perform addition and subtraction operations in the four arithmetic operations on numbers. The plus and minus signs are not a single concept in middle school physics. Some of them are equivalent to the plus and minus of rational numbers in mathematics, and some are used to express the nature and direction of physical quantities. The situation is more complicated.