It is most likely not harmful, but something that lives in the gravel and feeds on detritus. COuld be a planaria or bristleworm?
Hard to tell from the explanation, a pic might help, but probably hard to photograph.
Keep the tank clean and clean the gravel. Keep up wc's.
hth
Ardan