Jonathan Swift published Travels into Several Remote Nations of the World. In Four Parts. By Lemuel Gulliver, First a Surgeon, and then a Captain of several Ships in 1726 as a satire on human nature. Wikipedia also adds,
This is not the typical stuff that children's books are made of, but today, Gulliver's Travels is typically included in lists of children's books, especially the parts situated in Lilliput and Brobdingnag.
When exactly did people begin treating Gulliver's Travels as a children's book? The Wikipedia articles on the book itself and Jonathan Swift don't provide information about this, and a search about the book's reception history did not help either. There are a number of online articles and blogposts that point out that the back was not written as a children's book, but they don't say when the change in perception occurred. See for example Gulliver’s Travels Wasn’t Meant to Be a Children’s Book And More Things You Didn’t Know About the Literary Classic on the Smithsonian's website, and, in German, Gullivers Reisen.