They also might be fungus gnats, which breed in wet soil and often come in on houseplants. I had that problem with my toad's enclosure; I had to pull all her soil out and replace it. I baked the soil at 400 degrees for 20 minutes before I put it in her tank, just to kill any gnat eggs or bacteria they might feed on. If it's fungus gnats, they're not dangerous to people or animals, just annoying.