I just buoght the house this spring and have never seen this before. In the second bath (the one I don't use) I've been getting a lot of drain flies. I have tried keeping the tub plugged, the vinegar and baking soda foam suggestion, scrubbing as far as I can with a brush, bleach, and even used the tub for all my painting cleanup to poison the pipes. They keep coming back! Argh!
I'd call a pro, but I'm wondering what they will use that I can just buy myself if I knew what it was.