Aragorn (as Strider) speaking of the Black Riders
For the black horses can see, and the Riders can use men and other
creatures as spies, as we found at Bree. They themselves do not see
the world of light as we do, but our shapes cast shadows in their
minds, which only the noon sun destroys; and in the dark they perceive
many signs and forms that are hidden from us: then they are most to be
feared. And at all times they smell the blood of living things,
desiring and hating it. Senses, too, there are other than sight or
smell. We can feel their presence – It troubled our hearts, as soon as
we came here, and before we saw them; they feel ours more keenly
Middle-earth seems to have an extra dimension/astral plane/plane of existence, which is referenced a couple of times.
On this other plane, which overlays the "normal" reality, good and evil are physically manifest, you are light or you are dark, or of varying degrees of grey between.
The Ring has brought Gollum too far into the dark side of that realm, as it was doing to Frodo (emphasis mine) . . .
Gandalf moved his chair to the bedside, and took a good look at Frodo.
The colour had come back to his face, and his eyes were clear, and
fully awake and aware. He was smiling, and there seemed to be little
wrong with him. But to the wizard's eye there was a faint change just
a hint as it were of transparency, about him, and especially about the
left hand that lay outside upon the coverlet. 'Still that must be
expected,' said Gandalf to himself. 'He is not half through yet, and
to what he will come in the end not even Elrond can foretell. Not to
evil, I think. He may become like a glass filled with a clear light
for eyes to see that can
Here we see that the ring is also bringing Frodo into that other realm, if he had been captured by the Wraiths he would have become a thing like them (I can't find a quote for that at the minute), but now Gandalf thinks he will go to the light, but that the ring will have its effect on him "He may become like a glass filled with a clear light"
Some can see the other realm for eyes to see that can (such as the Elves that came from Valinor, the Maia and other spirits and/or beings of power), he would have become invisible to everyone else.
How does the ring do this? The "invisibility" the ring provides is done by it bringing the wearer into the other realm, the more you use it the less of you comes back from there, and more you are in it, and of it.
Gollum can't abide the touch of Elven things because he has been partially drawn into the dark side of that realm.