George Makari's Revolution In Mind argues that there were a few different crucial reasons why Vienna was a centre for learning and innovation at the turn of the century. Firstly, Vienna was the capital of the Austro-Hungarian empire, which controlled a rather large swathe of Eastern Europe, from Krakow to Prague to Lviv to Sarajevo. As a result, ambitious young men in the empire very often ended up in Vienna, in the same way that ambitious young people in the US end up in New York or LA. Freud himself was born in Vienna but the classic example of someone from the provinces moving to Vienna to get ahead is of course Adolf Hitler, who as a young man who moved to Vienna in 1907 to study art, and who sadly eventually discovered virulent anti-Semitism instead.
And the Austro-Hungarian Empire was ruled by Franz Joseph I from 1867 to 1916, giving the empire a sense of stability, which is helpful for science, allowing scientists to work steadily on problems without too much in the way of interruptions. And while there was certainly plenty of anti-Semitism in the Austro-Hungarian empire and in Vienna itself, Franz Joseph himself relaxed restrictions in 1867, granting civil equality to Jews, allowing them to move freely outside of the ghetto. Franz Joseph also had Jewish men as ministers in his administration, which Makari argues lead to a renewed sense of ambitiousness in Jewish circles in Vienna; a young Freud, initially interested in politics before settling down to become a doctor, saw the Jewish ministers in Franz Joseph's administration as heroes to be emulated. Initially this saw little pushback, but towards the end of the 19th century, after some economic shocks, things became more precarious for Jewish people in Vienna; a virulent anti-Semitist named Karl Lueger - who Hitler cited as an influence - became mayor of Vienna in 1897.
Makari also argues that one key difference between Vienna and elsewhere in Europe was that where French doctors were trained in hospital-based clinics, German schools were located at universities and German medical students learned the natural sciences as a matter of course. In Vienna, this turn from pragmatism to a focus on theory and science was effected by Carl Rokitansky, an anatomist and dean of the medical school. Professors in Vienna like Joseph Dietl argued - sometimes quite fairly - that the present state of knowledge made science-based medicine impossible, and that the solution was in better understanding of anatomy; remember that Dietl was arguing this before Pasteur's vaccinations were widely known, and well before the advent of penicillin. This atmosphere certainly had some negative effects for sick people in Vienna; Viennese hospitals and doctors were regularly slammed for their criminal neglect of their patients. However, for our purposes in answering this question, it meant that there was an atmosphere of experimentation and overturning of knowledge in medicine in Vienna. This meant that many doctors were trying innovative new, ostensibly science-based treatments, having come from a scientific background thanks to Rokitansky, but wanting to effectively treat patients as practitioners. It was this milieu that meant that figures like Freud and Krafft-Ebing found a more receptive audience than they might have in a more conservative medical culture.
In regards to the more sexual focus of Freud and Krafft-Ebing and why that became more acceptable in fin-de-siecle Vienna, Makari quotes Robert Musil as saying:
"Nobody knew exactly what was on the way...nobody was able to say whether it was to be a new art, a New Man, a new morality or perhaps a re-shuffling of society. So everyone made of it what he liked. But people were standing up on all sides to fight against the old way of life."
And especially after Darwin became well-known in Vienna (with his focus on sexual selection as being a major part of shaping humanity), one of the ways in which people attempted to reform society was in a movement towards loosening some Viennese sexual mores. Specifically, there was a movement around the Jung Wien writers and Hermann Bahr, and some loosening of sexual mores was encouraged by a section of the women's emancipation movement, aware of the prominence of prostitutes in Vienna; a 1911 survey of medical students found that 75% of them had lost their virginity to a prostitute, and some encouraged a freer sexuality as a way of improving society, reducing prostitution etc.
NB. Carl Jung wasn't a product of Vienna at all - he might be tempted to say of Vienna that "it means nothing to me", especially after he and Freud parted ways in acrimonious circumstances. Instead, Jung was born and educated in Switzerland. However Jung and his mentor Eugen Bleuler (from whom the term 'schizophrenia' comes from) were German-speaking and were inevitably influenced by the intellectual tumult in Vienna. Similarly, Richard von Krafft-Ebing was born in modern Germany, studied in Heidelberg, and had published Psychopathia Sexualis in 1886 while a professor in Graz in modern Austria. It was only in 1889 that he moved from Graz to Vienna to take up a professorship. Of course Krafft-Ebing being appointed as a professor in Vienna in 1889 played a big role in the interest in Freud's theories; many early adherents of Freud's theories had been trained by Krafft-Ebing and another medical theorist, Hermann Nothnagel, who encouraged medical students to look at the whole life of the patients.
Follow up question: What was the interaction with state authorities like for these authors? Did they face censorship or the threat of suppression or did they enjoy state funding and support?
Looks like I'm a bit late to the game on this one, sorry about that. I've been off-form for quite a while so sorry for the lack of an answer but I second /u/hillsonghoods answer and recommendation of George Makari's Revolution in Mind.
I also recommend looking into Carl Schorske's Fin-De-Siecle Vienna: Politics and Culture to help build an understanding of the atmosphere that led to Vienna becoming the epicentre of these fields.
Feel free to check out some of my other answers in this sub here that may help to answer your question too.