I just finished reading the annotated edition of Lolita, and Nabokov hid references to other works of literature everywhere. Lately I've also been considering ways to work in lyrics and other oblique references in my own work. Is there an accepted way to go about referencing or repurposing bits of other works without it becoming plagiarism? Should I try and contact the original authors first? And have any of you had negative experiences using these sort of references in your own work?
Allusion is a time-honoured writing technique. Copyright only protects the expression, not the idea itself, so as long as the expression is yours (you are saying things in your own words), you should be in the clear.
Short quotes will generally be okay as well, under a "fair use" or similar policy, but should be properly attributed and sourced, if possible, in non-fiction writing. When writing fiction, I'd generally advise against using direct quotes as a matter of style; far better to paraphrase or otherwise hint at the relevant quote and leave it to the observant reader to spot the reference.
However, should you find yourself wanting to reproduce a substantial or highly identifiable (something along the lines of Jabberwocky, say) portion of a copyrighted text verbatim, you stand to run afoul of copyright law. Such uses should be licensed.
Moreover, certain names or titles may be trademarked (this is generally restricted to media franchises), which might mean problems if you use them in the scope encompassed by the trademark; so look out for that.