Gertrude is the queen of Denmark, mother of Hamlet, widow of the dead king and married to his brother Claudius. The ghost says Claudius seduced her and asks Hamlet not to punish her: "leave her to heaven."
In Act I, scene 2, she joins the king in asking Hamlet to stay: "I beg you, stay with us; do not go to Wittenberg." In Act III, scene 4, Hamlet confronts her in her chamber, before the portraits of her two husbands, and she cries for help. Polonius, hidden, stirs behind the curtain and is killed by Hamlet. The queen says she sees in herself spots so black and deep-rooted, she does not see the ghost that Hamlet sees, and concludes: "Oh, he is mad."
In Act IV, scene 1, she tells Claudius that Hamlet killed Polonius and describes him as "mad as the sea and the wind," saying that "he weeps for what he has done." Then she receives the mad Ophelia, and it is she who tells Laertes that the girl drowned. At the burial, she throws flowers: "Sweet flowers for the sweet. Farewell."
How much she knew of the crime the play does not clarify: when Hamlet says his deed is nearly as bad as "killing a king and marrying his brother," she answers only "Killing a king?" In Act V, scene 2, she drinks the poisoned cup, even after Claudius asks her not to: "I will drink it, my lord; I beg your pardon."