I did a quick google and came up with this.
Jeffrey Hahn, Assist. Extension Entomologist
Stable fly. Photo credit:
Whether you are outside at your favorite lake cabin or sitting in your backyard in town, you probably have experienced a problem with flies biting at or near your ankles. These flies, similar in appearance to house flies, are known as stable flies. Stable flies, sometimes called biting house flies or ankle-biters, are about 1/4 - 3/8th and are gray with four longitudinal black stripes on their thorax.
However, while house flies have sponging mouthparts for sopping up liquid food, the mouthparts of stable flies are modified into a long, sharp bayonet-like proboscis. They feed on the blood of not only people but on many other mammals, including dogs, cattle, and horses. They are very persistent and very annoying.
The larvae develop in moist, decaying organic matter, such as urine-soaked straw and other soiled animal bedding, decaying grass clippings, poorly managed compost piles, or other decaying vegetation, preferring sites that are loose and not compact. However, you would not expect to find them in fresh manure. It takes the larvae about nine days to develop before they pupate. The adults appearing about two weeks later. Stable flies are active throughout the summer and into the fall.
Unfortunately stable flies are very difficult to control. Repellents, e.g. DEET, and protective clothes are partially effective in controlling stable flies. Sanitation of potential breeding areas can help but stable flies are strong fliers and can invade your yard from outside your property. If dogs that are outside are sufficiently bothered, protect them by placing them inside a screened kennel."
If this is the critter, looks like your best option would be to identify the breeding site and eliminate or control that.