"The Selfish Giant" operates within the fairytale genre. The first sentence alone goes a long way in evoking the various fairytale elements that are at play:
Every afternoon, as they were coming from school, the children used to go and play in the Giant's garden.
In addition to establishing an activity that has been repeated before the story's beginning and will be interrupted as the story unfolds, this sentence presents two sets of characters that ultimately hint at what sort of story is about to unfold. On the one hand, the reader knows that the general "children" will serve as an important collective character. On the other hand, the story will involve a Giant. Although authors and literary scholars have long disputed how exactly to define and classify fairytales, many agree that the presence of magic and/or mythical beings—including giants—can be used to differentiate fairytales from folktales.
However, the presence of magic in and of itself is not sufficient for categorizing a work of fiction as a fairytale. Fairytales are usually very old stories that have been passed down orally through generations before eventually getting written down. Unlike the fantasy genre, which often involves original stories created by their respective authors, fairytales usually invoke a tradition. While we often know who first collected and wrote down a version of a given fairytale, we rarely know who actually came up with it (in part because it's unlikely that it was just one person). In other words, "The Selfish Giant" may evoke the fairytale genre, but it's not—strictly speaking—a fairytale: that is, it's not a product of folklore or tradition.
So, given that Wilde came up with the story himself, it becomes necessary to be more specific when seeking to ascertain the genre of "The Selfish Giant." This specification can go in two directions, as the story contains elements of a literary fairytale as well as elements of a Christian fairytale.
A literary fairytale is a work that involves the typical fairytale setting and the typical folkloric narrative structure, but that is not a veritable fairytale because it has been created by a single author. The author of a literary fairytale appropriates the conventions of the fairytale genre in order to narrate an original story. In the same way that fairytales often reflect the worldviews and values of the cultures that they come from, the author may use the literary fairytale to critique the state of the world or human behavior. More specifically, the author's purpose may be to leave the reader with some kind of moral lesson by the end of the story.
This is where the Christian fairytale comes in. Wilde clearly seeks to offer a lesson through "The Selfish Giant" that can not only be described as moral but also Christian. In a Christian fairytale, biblical allegory structures the story and shapes its language. Wilde makes active use of Christian values and allusions to impart to his reader the personal and collective importance of Christian love. For a reader seeking to understand how Wilde juggles these two genres, it can be useful to consider the trees. On the one hand, Wilde anthropomorphizes them into talking beings capable of emotion and communication—as one could expect from a literary fairytale. On the other hand, Wilde links one of the trees with the cross—as one could expect from a Christian fairytale.