Gnats are attracted to sweet scents from fruit, moisture, garbage, houseplants, and other warm, moist areas like your bathroom or kitchen. Gnats also live and reproduce in sink drains and garbage disposals due to the food residue, water, and shelter that drains provide.