After enduring the insults of her son earlier and having witnessed the play performed in adherence to the instructions of Hamlet, Gertrude is asked by Horatio to speak to the grieving Ophelia in Act IV, scene v.
In an aside, Gertrude remarks, "To my sick soul, as sin's true nature is,/Each toy seems prologue to some great amiss (17-20).
These words see to presage her actions in Act V, scene ii. When Claudius, whom she must suspect of killing her husband, says "Gertrude, do not drink," she responds, "I will, my lord; I pray you pardon me"(268) Gertrude here may be asking forgiveness for her forthcoming exposure of him as murderer. In motherly fashion, she wipes the face of Hamlet as he prepares to duel Laertes, lovingly touching her son for the last time. When Hamlet rushes to her after she falls having drunk the poisoned wine, she does not mention Claudius; instead, she says, "O my dear Hamlet! The drink, the drink! I am poisoned" (289). As she dies Gertrude expresses her love for her son and implicates Claudius, hoping that Hamlet will avenge her death as well as her husband's. She must reason, too, that Hamlet will come out of his melancholia and feel again in charge of his fate.
Clearly, there are indications that Gertrude has willingly poisoned herself in order to save her child from further tragedy.
I think this question can be interpreted in 2 possible ways. I am sitting on the fence to determine whether or not Gertrude did know. If she knew the cup was poisioned I think that she drank the cup to save Hamlet from drinking it therefore suicide to save her son. If she didn't know, then I believe she was taking a stand against Claudius for the first time in the play and unforetunately for her, this was her downfall. Most likely though, I believe that Gertrude did not know and became the innocent victim in a plot of murder.
In ActIV Sc7 Claudius arranges for a fencing contest between Laertes and Hamlet. Laertes tells Claudius that he will poison his sword and kill Hamlet with it. Claudius In order to doubly make sure that Hamlet is killed says that he will have a cup of poisoned wine to be offered to Hamlet when he is tired, "I'll have prepared him/A chalice for the nonce,whereon but sipping/If he by chance your venom'd stuck/Our purpose may hold there."
In ActV sc2, in the course of the fencing match between Laertes and Hamlet, Claudius tries to make Hamlet drink the poisoned wine but he doesn't. At that moment, inspite of Claudius asking her not to drink the wine Gertrude takes the poisoned cup of wine and drinks it remarking "The queen carouses to thy fortune Hamlet." Nothing can be done to save Gertrude and she dies saying, "O my dear Hamlet-/The drink, the drink! I am poisoned."
The fact that Gertrude took the poisoned cup of wine to toast Hamlet in the course of the fencing match,"The queen carouses to thy fortune dear Hamlet" and the fact that she herself willingly reveals to the others that the cup of wine is poisoned and thus exposes Claudius' villainy is clear proof that her death is accidental and not suicidal.