This is the play that Hamlet asks a traveling troupe of actors to perform. Rosencrantz and Guildenstern originally asked the troupe to perform at the castle, and Hamlet is delighted when he discovers they are coming. Hamlet adds some lines to the play to be spoken by the actors.
"The Murder of Gonzago" mirrors the events that have occurred in Denmark, specifically Claudius's murder of King Hamlet. The play is about a king who is poisoned by another man, but before the king dies, he talks with his wife about love, death, and remarriage. This scene is where Hamlet has asked the actors to add lines in the play that reflect what Hamlet what Hamlet wants to test about Claudius's regicide and his mother's betrayal of his father.
In "The Murder of Gonzago," the queen promises never to remarry, especially not someone who murders her husband, but the king says she will forget her promise once he is gone. Claudius takes offense at the scene and, when they get to the point where King Gonzago is poisoned, Claudius gets up and leaves. Hamlet determines he has proven that Claudius killed King hamlet, Hamlet's father.