Very simply both, and I shall now quote Lord of the Rings at you for good measure:
"Go not to the Elves for counsel, for they will say both no and yes"(And 3 beans to those of you who know who said that - send me a PM)
But to answer the question:
It's about power, because it deals with the struggle between good and evil, and how power corrupts those that gain it. The Nazgul used to be kings of men, but they fell to the influence of Sauron and his rings, turning evil. Likewise Saruman used to be a maia (an angel-like creature), but he tasted power and it corrupted him. He is clever and when he suggests to Gandalf that they should join with Sauron it doesn't even seem like he does so from a point of evil, it seems he does so as a rationally wise choice.
"You did not seriously think that a hobbit could contend with the will of Sauron? There are none who can. Against the power of Mordor there can be no victory. We must join with him, Gandalf. We must join with Sauron. It would be wise, my friend."
This to me seems more like someone who has reviewed the situation coldly and found out that their best course of action is to go this direction, not someone who is ideologically convinced of the grandure of a cause.
At any rate, whether he succumbed to Sauron's greater power out of conviction or calculated rationale, it was the power that drew him in.
Likewise actually Sauron himself used to be a force for good, but was corrupted by the power of another evil power. So he too fell to the power of another. And the book is about this major struggle between the forces of good and evil.
Still, I would argue that it is more about friendship.
I think Frodo himself said it best:
Frodo: Frodo wouldn't have got far without Sam.
Sam: Now Mr. Frodo, you shouldn't make fun; I was being serious.
Frodo: So was I.
And that is very very true.
Neither of them would have made it through to the end without the other. The physical support being an obvious factor, but also the mental support Sam gave to Frodo is ultimately the reason he was able to carry the Ring.
And if you recall, Gollum actually forged some kind of tentative friendship with Frodo, and that, sparing Gollum's life, and building enough of a relationship with him to have him follow them, was what led him to still be there at the end, and what ultimately ensured that the Ring was destroyed, albeit not on purpose.
So I would go with friendship.
I would however like to propose a third option:
I think even more than any of the two above, it's about good and evil. What it is to be good and what it is to be evil and how sometimes a person can be both and how we deal with that. And what our choice means about our own standing on that scale of good vs. evil.