Hi Louise
Black marks like that can either be a natural colour change which is normal in goldfish and harmless, or it can be a sign of toxic ammonia in the water. Could you please answer as many of the following questions as you can? We need some background info. to help figure out what's happening with your fish.

Ammonia level
Nitrite level
Nitrate level
pH level
pH level from the tap
Tank size(how many gallons)
How long has it been running?
What kind of filtration?
What kind of aeration
Tank temperature
How often do you change the water and how much each time?
What kind of water additives or conditioners are used?
Any medications added to the tank?
How many fish in the tank and their size?
Add any new fish to the tank recently?
What do you feed your fish and how much / how often?
Any unusual findings on the fish, such as "grains of salt", bloody streaks, frayed fins, fungus?
Any unusual behavior, like staying at the bottom, not eating, etc..?