The Chaos Crystal is a fragment of a crystal that originally came from the source of all magic in the DC Universe — the Sphere of the Gods. In the comics, this is the metaphysical reality that is home to gods and immortal beings, including the likes of Diana's father Zeus, Steppenwolf, and Ares, whom Diana battled in Wonder Woman.
An amplifier and manipulator of raw power, the crystal has the ability to grant wishes, using energy and magic to morph reality on a huge scale, but at a steep cost to the wisher. The Chaos Crystal's presence in DC Comics is tied to Superman, also known as Kal-El. At one point, the U.S. government gets their hands on it and wishes for a weapon strong enough to stop Superman if he ever went rogue. Similarly, Batman uses it to amplify Kryptonite, making it more dangerous to Kal-El. Superman then destroys the crystal, breaking it into shards that scatter across the universe.
To note, there is an item from the comics actually called the Dreamstone. With similar powers to the Chaos Crystal, it was created by Doctor Destiny to use against the Justice League. The object first shows up in Justice League of America in the 1960s, and moved into the '80s and beyond as part of Neil Gaiman's Sandman series, which began ostensibly in the well-worn DC universe before carving out its own path. Though Wonder Woman 1984‘s Dreamstone shares traits with this one, the film version is likely an amalgam of the comics' Dreamstone and the Chaos Crystal, with more similarities to the latter than to Morpheus' stolen charm.