The elements of science fiction as a genre are debatable. In the early days, science fiction could be seen as an offshoot of Gothic lit, and many 20th century sci-fi writers were heavily influenced by writers such as Mary Shelley and Edgar Allen Poe. In the early part of the 20th century, science fiction stories became a regular feature of pulp magazines. In fact, science fiction appeared primarily in the short story format until much later in the 20th century.
Generally, readers imagine that a futuristic story people with aliens and robots must be science fiction. Critics, however, are a bit more particular. For instance, Star Wars is not typically viewed as a science fiction tale. Certainly it has space, lasers, and robots, but really it is more of a fantasy tale in futuristic costume.
Science fiction takes rational scientific ideas and expands or develops them in a fictional, often future, world. This scientific component is a basic commonality among various works in the genre. Science fiction often tries to answer the question "What if?" What if created robots so advanced that they developed consciousness? What if human beings could be bioengineered? Science fiction can often be used as a vehicle to comment on contemporary issues, technologies, and problems.
There are certain criteria for the Gothic tale. Some of these are the sinister presence of evil, more often a psychological aberration, the woman in distress, the grotesque, a dark setting with a castle or mansion or cathedral--some place that has dungeons and secret passageways, the supernatural (ghosts, etc.), a Romantic (the movement) type of tale, Most critics credit Horace Walpole, who wrote "The Castle of Otranto," with writing the first Gothic novel. His is a narrative of a psychotic minister who has religious delusions and kills his son. The setting is a medieval castle, the classic Gothic setting.
Of course, many of Edgar Allan Poe's stories are Gothic. His "The House of Usher" is a renowned Gothic story. Poe's influence fostered the development of the Southern Gothic tale. In Southern Gothic, the "grotesque" is a dominant feature. Flannery O'Connor's characters have limbs missing, for example. William Faulkner's Emily Grierson keeps a dead lover in her room for years. Another characteristic of Southern Gothic is the city slicker or the country bumpkin. There is the decaying or inbred Southerner as in Erksine Caldwell's "Tobacco Road." The pompous preacher and the flim-flam man are often characters in a Southern Gothic tale, as well.