What is the earliest novel that makes use of second-person narration through the entire book, excluding choose-your-own-adventure books?
A good place to start is Monika Fludernik’s annotated bibliography of second-person fiction (up to 1994):
The bibliography has four different sections:
A. a list of those second-person texts that meet my requirements. […] The second-person pronoun refers to a fictional protagonist;
B. a list of texts noted in the literature as being second-person texts but that do not correspond to my definition. […]
C. a very short list of a few films with second-person voice-over […]
D. a list of criticism on the second person and address in general, on second-person narrative, and on second-person uses in poetry.
Monika Fludernik (1994). ‘Second-Person Narrative: A Bibliography’. Style 28:4, pp. 525–548.
Do not rise yet; you may find thoughts agreeable enough, when you awake, to entertain you longer in bed. And ’tis in that hour you ought to recollect all the dreams you had in the night. If you had dreamed anything to my advantage, confirm yourself in that thought; but if to my disadvantage, renounce it, and disown the injurious dream. It is in this hour also that I give you leave to reflect on all that I have ever said and done, that has been most obliging to you, and that gives you the most tender sentiments.
Aphra Behn (1686). The Lover’s Watch. In The Novels of Mrs Aphra Behn, pp. 203–270. London: Routledge.
(This novel has alternating sections of second-person narration and verse. In form it does not much resemble the modern novel, but in the seventeenth century the novel was a new literary form and its constraints and conventions were still being developed.)
Fludernik’s bibliography shows that second-person narration was rare until the mid-20th century. Another early example of a novel is:
You are William Barton Sidney. Your entire existence, from childhood through sexual awakening into prosperous middle age, is recounted in these pages. Your life is respectable, normal, prosaic. Yet nobody suspects that you are aware of multiple personalities within your body, and that your head is full of voices.
Rex Stout (1929). How Like a God. New York: Vanguard.
(This novel has alternating sections of second- and third-person narration.)
The oldest example of second-person narration I could find is The Haunted Mind by Nathaniel Hawthorne. It was first published in 1835 and later included in volume 2 of Twice-Told Tales (1842). Unfortunately, this is a short story.
A perhaps more famous example is Italo Calvino's If on a winter's night a traveler, a postmodern novel published in 1979.
Related: The oldest German example I have been able to find is Ilse Aichinger's short story "Spiegelgeschichte", which was written in 1949. In addition using a second-person perspective, the narrator also tells the story of her life an reverse chronological order. Aichinger was awarded the Literature Prize of the Group 47 for this story in 1952. However, since the question is about a novel, this is only indirectly relevant.
Note: Balthazar de Bonnecorse's Le Montre, first published in 1666, is not a novel as we know it but some sort of narrative interspersed with poems.