Aiming at the problem that the current image defect detection models have poor detection effect on tail categories in long-tail defect datasets, a GGW-DND Loss (Gradient-Guide Weighted-Deferred Negative Gradient decay Loss) was proposed. First, the positive and negative gradients were re-weighted according to the cumulative gradient ratio of the classification nodes in the detector in order to reduce the suppressed state of tail classifier. Then, once the model was optimized to a certain stage, the negative gradient generated by each node was sharply reduced to enhance the generalization ability of the tail classifier. Experimental results on the self-made image defect dataset and NEU-DET (NEU surface defect database for Defect dEtection Task) show that the mean Average Precision (mAP) for tail categories of the proposed loss is better than that of Binary Cross Entropy Loss (BCE Loss), the former is increased by 32.02 and 7.40 percentage points respectively, and compared with EQL v2 (EQualization Loss v2), the proposed loss has the mAP increased by 2.20 and 0.82 percentage points respectively, verifying that the proposed loss can effectively improve the detection performance of the network for tail categories.