In a letter to Milton Waldman (so-called Letter 131), Tolkien makes mention of Sam being the "chief hero" of the story :
I think the simple 'rustic' love of Sam and his Rosie (nowhere elaborated) is absolutely essential to the study of his (the chief hero's) character, and to the theme of the relation of ordinary life (breathing, eating, working, begetting) and quests, sacrifice, causes, and the 'longing for Elves', and sheer beauty.
He also makes mention of Sam's heroic nature in a reply to a real-life Sam Gamgee (so-called Letter 184):
It was very kind of you to write. You can imagine my astonishment, when I saw your signature! I can only say, for your comfort I hope, that the 'Sam Gamgee' of my story is a most heroic character, now widely beloved by many readers, even though his origins are rustic.
Elsewhere, in a letter to his son Christopher (so-called Letter 91), he begins:
Here is a small consignment of 'The Ring': the last two chapters that have been written, and the end of the Fourth Book of that great Romance, in which you will see that, as is all too easy, I have got the hero into such a fix that not even an author will be able to extricate him without labour and difficulty. Lewis was moved almost to tears by the last chapter. All the same, I chiefly want to hear what you think, as for a long time now I have written with you most in mind.
The last two chapters of the "Fourth Book" refer to the end of The Two Towers : in the last two chapters—"Shelob's Lair" and "The Choices of Master Samwise"—only two characters are present: Frodo and Sam. The latter chapter, aptly named, is told exclusively through the narrative of Sam.
Note 1 In the comments, user8114 mentions that it's Aragorn to whom Tolkien is referring to as "the chief hero" in the excerpt above. And indeed, Aragorn is mentioned prominently in the paragraph that surrounds the excerpt. But the context does not support this hypothesis.
Letter 131 is an attempt to justify the themes and motifs to his friend and potential publisher, Milton Waldman, against comments regarding the marketability of The Lord of the Rings. The excerpt above regarding Sam, his Rosie, and "the chief hero's character" is in the middle of a long paragraph on the love stories present in the work:
Since we now try to deal with 'ordinary life', springing up ever unquenched under the trample of world policies and events, there are love-stories touched in, or love in different modes, wholly absent from The Hobbit. But the highest love-story, that of Aragorn and Arwen Elrond's daughter is only alluded to as a known thing. It is told elsewhere in a short tale. Of Aragorn and Arwen Undómiel. I think the simple 'rustic' love of Sam and his Rosie (nowhere elaborated) is absolutely essential to the study of his (the chief hero's) character, and to the theme of the relation of ordinary life (breathing, eating, working, begetting) and quests, sacrifice, causes, and the 'longing for Elves', and sheer beauty. But I will say no more, nor defend the theme of mistaken love seen in Eowyn and her first love for Aragorn. I do not feel much can now be done to heal the faults of this large and much-embracing tale – or to make it 'publishable', if it is not so now.
Here, Tolkien enumerates three love stories:
- Aragorn and Arwen
- Sam and Rosie
- Eowyn's unrequited love for Aragorn
The first story he points out is only mentioned and left alone for another story. The second he emphasizes as being important to understanding the chief hero's story. The third he intentionally takes off the table for discussion.
Looking at the specific sentence mentioning Sam, there are two uses of the pronoun "his": first to "his Rosie" and then, 9 words later, to "his character". Tolkien, being a scholar of the English language, would not first refer to Sam, then—in mid-sentence—change the referent to Aragorn for five words, then back to Sam to describe his qualities as exemplars of the "ordinary life".
Additionally, if Aragorn were the chief hero, it seems reasonable he would've made one of the two love stories involving him essential to understanding his character, instead of brushing them aside in favor of Sam's love story with Rosie.
And, given his repeated and consistent emphasis on Hobbits, not Men or Elves or Dwarves or Ents, being the heroes of The Hobbit and The Lord of the Rings, Aragorn is not a fit: he's merely someone by which to compare the plights of the Hobbits, much like Gimli and Legolas.
It should also be noted, as the redditor richlaw pointed out, Christopher Tolkien himself believed his father meant Sam was the chief hero, not Aragorn. Wayne Hammond and Christina Scull—creators of the index for the published Letters of J.R.R. Tolkien—addressed this concern on the Lord of the Rings Fanatics Forum, where they explained they wrote to Christopher Tolkien asking for clarification regarding the passage in Letter 131:
To this Christopher replied, very succinctly, that he was certain that 'the chief hero' referred to Sam.
Note 2 The Lord of the Rings was published in three volumes with two books each; The Two Towers contains books 3 and 4. Later in the same letter, Tolkien discusses how to get out of the hole he dug himself in books 5 and 6 (i.e., The Return of the King).