Hamlet, also called The Tragedy of Hamlet, Prince of Denmark, is a play written by William Shakespeare around 1600 set in Denmark about a young prince and his efforts to expose his uncle the King as his late father's murderer.
While sharing "The Tale of the Three Brothers" to the locals of Wyvern Hill, Shari includes the line "aye, there was the rub", echoing a line from Hamlet's "To be or not to be" soliloquy in Act III, Scene i. ( "The Draw")
The gargoyle Ophelia shares her name with the character first introduced in Act I, Scene iii. In his adventures outside of Avalon every century, Guardian may have come across the play and the name. 
Real World Background
The oldest known written account with several elements recognizable with Shakespeare's famous play was written around 1200 AD by the Danish historian, Saxo Grammaticus. While it is possible his chronicle, Gesta Danorum (translated to The Deeds of the Danes), was influenced by other, older oral traditions and written accounts, none are believed to have survived to the modern day.
Saxo named the legendary Scandinavian Prince Amleth who, unlike his counterpart from the Bard, survives his revenge plot against his Uncle Fengi, the King.
Saxo's Latin text about Prince Amleth was translated to French in 1570 by François de Belleforest in his Les Histoires Tragiques. It is believed that Shakespeare may have first encountered the Danish Prince's story from reading Belleforest's translation. While it has been speculated that Shakespeare may have also crossed paths with an earlier version of the play (considered by its proponents to be lost and referred to now as the Ur-Hamlet), more recent scholarship argues that it is far more probable that earlier mentions of the play before 1599 were not the product of some other contemporary playwright, but rather were references to Shakespeare's own earlier versions of the play that he ultimately spent years revising.