Grams is a weight and milliliters is a volume thus there is no conversion for the two.
Sorry sloth, that is a poorly phrased question. You are mixing two different types of measurements. ML is milliliters and therefore is a measure of volume. Usually for food or drink it is a measure of a liquid such as water, milk, or oil. However for arguments sake lets say you did a measure of 100ML of water and 100ML of Jelly or Jam. They definitely would not weigh the same amount. 500g refers to weight. If I had 500g of lead shot it would not be the same volume of material as if I had 500g of lettuce. If you can help with what you are actually measuring that might help.