Quite simply because, he is a seer.
A seer is a gifted wizard or witch who has the ability to see
into the future with their Inner Eye. Seers predict prophecies, which
are then recorded and stored in the Hall of Prophecy in the Ministry
of Magic's Department of Mysteries. According to Minerva McGonagall,
true Seers are extremely rare, and she had doubt that Sybill Trelawney
can be considered as one despite her sporadically accurate
predictions. Albus Dumbledore once told Harry Potter that seeing into
the future is incredibly difficult because of the complexity of every
single action and their consequences.
AND Confirmed by J. K. Rowling in a Dec 2016 tweet and on Grindelwald's Wiki Page:
Divination: Grindelwald was a Seer. He had a vision about the
existence of a powerful Obscurial linked to Credence Barebone.
However, Grindelwald is seemingly not an expert in this magical field,
as he initially misinterpreted his vision, believing that Credence
would lead him to the Obscurial child while in fact, Credence was the
Obscurial himself. It should be noted, however, that Credence is the
only known Obscurial ever to have survived past the age of ten, so
Grindelwald could possibly not have anticipated this. Indeed, while
possibly not an expert in Divination, Grindelwald's raw Seer power was
phenomenal, to the point that twelve years prior to the Muggles
starting the Second World War, Grindelwald predicted it in detail, and
was able to use his skull-hookah to project fearsome images of the
future Blitzkrieg, Holocaust, and atomic bombings for attendees of his
rally to see. At the end of his life, Grindelwald claimed that he knew
that Lord Voldemort would come to him in Nurmengard, which might be
another instance of Grindelwald's Seer foresight.
The concept of Seers and Divianation were introduced in the Harry Potter films & novels. Professor Trelawney (played by Emma Thompson) does seem to have the gift, despite that Hermione Granger or Professor McGonagall may lack some understanding of how it may work for some, as Trelawney seemed to act more as medium of information, as opposed to seeing visions the way Grindelwald appears to.