Gertrude dies when she mistakenly drinks poisoned wine intended for Hamlet. Earlier in the scene, Claudius had dropped a poisoned pearl in the cup and offered it to Hamlet.
Some productions of Hamlet play the scene to imply that Gertrude knows the cup is poisoned but drinks anyway as an atonement for her sins. The text of the play is ambiguous. When Claudius warns her not to drink, she says, "I will, my lord; I pray you pardon me." While it seems unlikely that she knew the cup was poisoned before she picked it up, it is possible something in Claudius' manner or tone makes her suspect the truth.