Literally, "one who knows." Every religion has its gnostics, but Gnostic with a capital G almost always refers to Christian Gnostics. Beliefs vary widely, but essentially they value personal revelation and mysticism over dogma. Gnostics believe absolute religious truth can be known but it is only revealed towards enlightened humans, and the Gnostics purported to teach secrets that orthodox Christianity did not know. Hence, most Gnostic gospels are titled "The Secret Book of insert name
The more extreme Gnostic theologians theorized that the Earth was created by an imperfect creator, called the Demiruge, who had "spun off" from a higher Father but does not realize it. Jesus was sent by the Father to show humanity the truth. The Cainites went one step further; they believed the Demiurge was evil, and they worshiped as saints all who stood against him in the Bible - Cain, Judas, etc.
The gnostics were mostly eliminated by Irenaeus and the orthodox movement, but they have seen a resurgence in the 20th century, as more gnostic gospels are discovered and translated.