Of course, there's no evidence to support that it's true. Narcissists -- people who really love themselves -- are horrible relationship partners. My friend Keith wrote a great book on this (called _When You Love a Man Who Loves Himself_). Narcissists lack empathy; they play games; they cheat.
And as Keith also likes to say, "If I had to name the top ten things necessary for a good relationship, loving yourself would not be on the list." That's because most of the time, a good relationship requires *not* putting yourself first. Good marriages are based on compromise. And I don't think it's any coincidence that the divorce rate has stayed high (despire people marrying later, and thus probably wiser) at the same time that the self-emphasis has grown. Previous generations didn't worry much about loving themselves.
Some research does show that low self-esteem people are more likely to doubt their partner's affection, but this doesn't mean that they love their partner any less, and they don't choose bad partners (contrary to another popular belief). And high self-esteem people aren't much better -- they get mean and defensive when they are challenged.
Much more important for relationship success is a variable called attachment style, which is about how you relate to others (rather than your self-feelings). Having a good match of attachment styles predicts relationship success much better than the self-esteem of the partners.
The popularity of this statement might have started in therapy sessions, where people with serious addictions were told that they needed to get themselves together first before they started a relationship. But that's not the same as loving yourself first, and there's no reason it needs to apply to everyone.