Your genes primarily affect when gray hair appears. However, stress, certain health conditions, and nutrient deficiencies also raise factor in.