Is the infinitive form of the verb appropriate in this sentence?
Solution 1:
Between these options, you should definitely choose the infinitive here:
To be honest it sounds like she’s got the perfect relationship, in her eyes, going right now. So I don’t think you should be swayed when she desires to keep having it.
However, the entire sentence could be improved (and I could do better if I had context):
To be honest, it sounds like she thinks she’s got the perfect relationship going right now. So I don’t think you should be surprised if she says she wants it to continue.
(I'm not sure if you wanted the word "swayed" in there; correct me if I'm wrong.)
Solution 2:
The verb desire takes the infinitive form, so I desire to eat is correct and I desire eat is not. However, the gerund of the verb can be used as normal noun, so I desire eating would also be appropriate.
So in regards to the original question, these forms would be appropriate (although the second one changes the meaning a little):
So I don't think you should be swayed when she desires to keep having it.
So I don't think you should be swayed when she desires having it.
As @drm65 has noted, the entire sentence could be improved to make it more concise and clear, with something like this:
So I don't think you should be surprised if she says she wants to continue it.
But be aware that the same issue with the infinitive is present in this form. If she says she wants to continue it is correct, but if she says she wants continue it is not correct.