Grains means grains per gallon of hardness. A gpg is 17.1 ppm or mg/l which is the same measurement.
Most detergents are formulated for the average hardness in your region of the country. Too much detergent can etch glassware. Especially if the water isn't very hard or is naturally soft (low pH, acidic).
If you are on city water, call the water company adn ask their average hardness or if you have your own well, buy a hardness test kit at most any hardware store or have a water test done at a lab or any water treatment dealer.