If God loves all, how can the Bible say that he hates sinners? I believe that the basic answer is that God both loves and hates sinners, but he loves them more than he hates them. I don’t think one can reasonably get around the number of texts that explicitly state that God hates sinners. I think the answer lies in the complexity of personal nature.
We can all both love and hate the same person (or even thing) at the same time. For example, one might hate someone as long as they continue in wicked actions and want destruction to fall upon them while in that wicked state if they will not abandon it, but at the same time desire that they turn from that wicked path and be saved, and indeed want this much more than that destruction fall upon them. This is just how it is with God. He hates the sinner in their sinful state and has them slated for destruction, yet he loves them even more and desires that they not continue in their sin and be destroyed, but turn and live (e.g., Ezekiel 33:11).
Another aspect of it is what the Bible means by love and hate. As is commonly noted, the Bible’s use of these terms is more action oriented than emotionally oriented. That does not necessarily mean that there is no emotion involved, but at least that the action or inclination toward action is what is mostly in view. The fact that God is committed to the destruction of the wicked and has them slated for such can rightly be regarded as hatred for them and/or as arising from his hatred of them. The fact that God takes action to save them from suffering the destruction he would bring upon them conditioned upon their reception of his offer of salvation can rightly be regarded as love of them and/or as arising from his love of them.
All in all, I think the popular cliché that God hates the sin, but loves the sinner (or loves the sinner, but hates the sin) is correct to the spirit of Scripture, especially as stated here, without explicitly denying that there is a sense in which he hates the sinner. So I am not one to criticize that cliché or even to avoid it. But if one wants to be more technical, I do believe that the biblical teaching is that God both loves and hates sinners, but that he loves them much more than he hates them and would much rather they repent and live than fall under His judgment.
Here are helpful comments from D. A, Carson, though he is less a fan of the cliché I mentioned than I:
One evangelical cliché has it that God hates the sin but loves the sinner. There is a small element of truth in these words: God has nothing but hate for the sin, but this cannot be said with respect to how God sees the sinner. Nevertheless the cliché is false on the face of it, and should be abandoned. Fourteen times in the first fifty psalms alone, the psalmists state that God hates the sinner, that His wrath is on the liar, and so forth. In the Bible the wrath of God rests on both the sin (Rom. 1:18–23) and the sinner (1:24–32; 2:5; John 3:36). Our problem in part is that in human experience wrath and love normally abide in mutually exclusive compartments. Love drives wrath out, or wrath drives love out. We come closest to bringing them together, perhaps, in our responses to a wayward act by one of our children, but normally we do not think that a wrathful person is loving. But this is not the way it is with God. God’s wrath is not an implacable blind rage. However emotional it may be, it is an entirely reasonable and willed response to offenses against His holiness. At the same time His love wells up amidst His perfections and is not generated by the loveliness of the loved. Thus there is nothing intrinsically impossible about wrath and love being directed toward the same individual or people at once. God in His perfections must be wrathful against His rebel image-bearers, for they have offended Him; God in His perfections must be loving toward His rebel image-bearers, for He is that kind of God. . . . The reality is that the Old Testament displays the grace and love of God in experience and types, and these realities become all the clearer in the New Testament. Similarly, the Old Testament displays the righteous wrath of God in experience and types, and these realities become all the clearer in the New Testament. In other words both God’s love and God’s wrath are ratcheted up in the move from the Old Testament to the New. These themes barrel along through redemptive history, unresolved, until they come to a resounding climax in the Cross. Do you wish to see God’s love? Look at the Cross. Do you wish to see God’s wrath? Look at the Cross.