Excellent question! You are absolutely right that they are very similar terms and often times get used somewhat interchangeably by students.
Density is described as the mass of an object compared to its volume. Specific gravity is what we would call a "Relative Density" because we are comparing the density of an item (say a mineral) to something else. Most commonly, we use the density of water. This way we can compare mineral densities to a standard/constant substance. Why do we use water? Because it's easy! We could calculate a specific density of a mineral compared to liquid mercury, but that would create numbers that are not very common or not very intuitive. Water is the best standard substance we have!