Even if there’s no food present in your bathroom, flies and gnats may be attracted to this space because of its warmth and moisture buildup. To get rid of flies, try fly traps made with vinegar and dish soap or call a professional pest control.