I concur with Zeiss Ikon's answer: the story that inspired C. S. Lewis is "The Man Who Lived Backwards", a short story by Charles F. Hall, published in Tales of Wonder #3, Summer 1938.
It should be noted that Tales of Wonder was a British magazine, not American as stated by Lewis. This would have been an easy mistake for him to make, as Tales of Wonder was one of the first British science fiction magazines, preceded only by the juvenile Scoops; most of the magazine science fiction available at the time would have been in American magazines such as Weird Tales, Amazing Stories, Wonder Stories, and Astounding Science-Fiction (ancestor of today's Analog).
Hall's story was reprinted in Tales Before Narnia: The Roots of Modern Fantasy and Science Fiction, an anthology of literary influences on C. S. Lewis, edited by Douglas A. Anderson. I quote Anderson's introduction to "The Man Who Lived Backwards":
In the preface to The Great Divorce, Lewis wrote: "I must acknowledge my debt to a writer whose name I have forgotten and whom I read several years ago in a highly coloured American magazine of what they call 'scientifiction'. The unbendable and unbreakable quality of my heavenly matter was suggested to me by him, though he used the fancy for a different and most ingenious purpose. His hero traveled into the past and there very properly found raindrops that would pierce him like bullets
and sandwiches that no strength [could] bite because, of course, nothing in the past can be altered. I, with less originality, but I hope with equal propriety, have transferred this to the eternal. If the writer of that story ever reads these lines I ask him to accept my grateful acknowledgement."
Lewis was wrong about the piece appearing in an American magazine. It in fact appeared in a
short-lived, highly colored British magazine, Tales of Wonder. The story is "The Man Who Lived Backwards" by Charles F. Hall, and it appeared in issue 3, summer 1938. It was Hall's first published story, followed only by one other, another time story, "The Time-Drug" in issue 5, winter 1938. After the publication of these two promising stories in the manner of H. G. Wells, Hall disappeared without a trace.
[Anderson actually quoted Lewis as writing "sandwiches that no strength would bite" (emphasis added). I don't have a copy of The Great Divorce at hand, but everywhere else that I have seen this passage quoted (for instance here) the phrase is given as "sandwiches that no strength could bite", which makes more sense.]
I will now compare Lewis's description, point by point, with passages from Hall's story as printed in the original 1938 magazine which Lewis would have read. (There are a few minor differences between the two versions, e.g., the reprint in Tales Before Tolkien has "backwards" instead of "backward" in the first excerpt below, and "an" instead of "any" in the last one.)
His hero traveled into the past
Was it possible that when that puzzling flare of light had come, his Time-sense had in some way been reversed—turned back to front, as it were? Or to put it another way, had he been plunged into a Time Stream which flowed in exactly the opposite direction to the normal one?
You understand, of course, that at that time Rostof had not the vaguest notion of what had happened as he stood by the gap, save a suspicion that some form of electrical discharge had taken place. But the more he thought, the more it seemed possible that only some such incredible reversal of Time could explain the phenomena which so puzzled him.
If he were steadily progressing backward in Time, then the surprising topsy-turviness of external actions became more understandable. His friends walking backward, for instance; the water that flowed upwards; his ability to see himself. He was simply witnessing the Past, like seeing a film run in reverse. But more than witnessing—he was living through the Past, every second taking him deeper and deeper into it.
and there very properly found raindrops that would pierce him like bullets
Inside five minutes he was gazing out at the strangest rain shower he had ever seen, a shower in which the drops, like deadly silver bullets, shot up at lightning speed from the ground and vanished into the sky. Pools in the road split up into a myriad tiny streams that spread away in all directions and finally dissipated themselves in drops which hurled themselves at the clouds above. Had he been caught out in that queer rainstorm his body would have been slashed to ribbons in a matter of seconds.
and sandwiches that no strength would bite
But by the middle of the morning, the thought of a prolonged existence in this state ceased to bother him. For he realised what he should have done before, that unless a miracle happened, in a few days he would be dead of starvation and thirst.
Not until the pangs of hunger drove him to try to sample some sandwiches from a coffee-stall was the realisation brought home to him. Tug and strain as he might, he could not lift the smallest crumb. He tried bending his head to bite a piece from a sandwich, but it was like trying to bite a concrete slab. He tried to lift a cup of coffee, but it was immobile as a rock. In a sudden panic he dipped his fingers into the cup, trying to scoop up a little of the liquid. He could not even ripple the surface; it was like scratching at a block of brown glass.
because, of course, nothing in the past can be altered.
Try to picture him as he sat there, naked, defenceless, fighting to keep calm and grapple intelligently with a situation that should have sent him mad. Imagine his incredible loneliness; one small human, plunging towards a vague and misty future which lay in the Past, while with each second everything that stood for friendship, safety and comfort, was hurtling farther away in the opposite direction.
Grimly, he dragged his mind from the image and concentrated it on the scientific side of the problem. For a while he could not understand the impenetrable hardness of external objects which he had experienced; it seemed they ought rather to be of intangible transiency, much as a dream, since he was re-viewing the Past. But a moment's thought gave him the logical answer.
The Past is definite, shaped, unalterable, as nothing else in Creation is. Therefore, to argue that he could make the slightest impression on it, that he could move or alter any object here, was to argue that he could change the whole history of the world or cosmos. Everything he saw about him had happened, and could not be changed in any way. On the other hand, he was fluid, movable, alterable, since his future still lay before him, even if it had been reversed; he was the intruder, the anomaly. In any clash between himself and the Past, then, the Past would prove irresistible every time.