I wouldn't say anything is required before reading the book, you can just jump right in. But anyway, the poem mentioned was probably Kubla Kahn or Rime of the Ancient Mariner by Coleridge. You don't need to know them by heart, I'd just skim the wikipedia pages.
Also not necessary, but it wouldn't hurt to listen to some classical music.
Nothing to read, but if you don't understand something hit google and look it up. Amazing books, but they're based upon some references most people may not know.
I was - and still am - a fan of Hitchhikers guide to the galaxy, and wanted to know more about Douglas Adams. Before I read Dirk, I read The Salmon of Doubt. The stories in that book that Adams tells about himself really give you an inside look into the Dirk Gently book, and into Adams as a whole.
The things in Dirk Gently that I didn't understand I simply looked up as I read the book. But honestly, I don't think I missed too much.
I stumbled on an audiobook version read by Adams himself, and I can’t recommend it highly enough. Years later I still read the books in his voice
the book references The Rhyme of the Ancient Mariner by Coleridge, specifically, the line "a thousand slimy things lived on and so did I".
Read up on that and the book will make more sense.
Per [rule 3.3](https://www.reddit.com/r/Books/wiki/rules), please post book recommendation requests including recommendations on how to prepare for a specific book in /r/SuggestMeABook or in our Weekly Recommendation Thread.