All excellent answers. I would only the add the problem Gertrude must have had dealing with her role in her son's "madness." She clearly felt a rather generic and distant guilt before this scene; here, though, she see what has happened to Hamlet: he is mad enough to kill, enraged at her for marrying Claudius, and seeing ghosts where there apparently are none.
When Gertrude enters Act IV, scene i, Hamlet has just left her "closet" during which time he has killed Polonius, talked to the Ghost (rather thin air, as far as Gertrude can see) and begged her to repent her life of sin with Claudius and not go to his bed any more.
Her first problem is protecting her son by not revealing to Claudius that Hamlet has confessed to her:
That [he] essentially [is] not in madness,
But mad in craft.
Her second problem is the dead Polonius, killed by Hamlet in her room. This would have been a problem on many levels, but Gertrude seems to want to make sure that Hamlet is not punished for this act, so she stresses Hamlet's madness to Claudius.
Her third problem is her own conscience. When Hamlet berates her for marrying the vastly inferior Claudius, she confesses:
Thou turn'st my eyes into my very soul,
And there I see such black and grained spots
As will not leave their tinct.
So, her third problem is her own need for self-reflection and consideration of the possibility that she has, indeed, acted improperly in marrying Claudius.
As she has told Hamlet in Act III, "O, Hamlet, thou hast cleft my heart in twain," at the beginning of Act IV, Gertrude is still very distraught. She has three concerns:
1. After having been forced by Hamlet's words to realize her guilt in marrying Claudius, and being instructed by Hamlet to not reveal what he plans--
Let the bloat king tempt you again to bed....
Make you to ravel all this matter out
That I essentially am not in madness,
But mad in craft.--(3.4.186-192)
Gertrude is concerned about how she will be able to distance herself from the king and live with her shame.
2. In addition, after Hamlet has killed Polonius, she fears that he may be mad, even though he has told her he is merely "mad in craft" and planning to expose Claudius.
3. Finally, her concern for the consequences of Hamlet's murder of Polonius and Hamlet's safety worry her as Claudius tells Gertrude that they must reveal to their "wisest friends" what has happened
The beginning of Act IV of this play is a very difficult time for the central three characters. Things have been brought to a climax with the success of the "Mousetrap", which has been successful in proving the guilt of Claudius in the murder of his brother, the former King, and also the veracity of the words of the Ghost. This has also given Hamlet the impetus he needed to accuse his mother with the truth, and challenge her behaviour, in particular with relation to her short time of mourning and the way she has embraced (in every sense of the word) a new relationship with her former husband's brother. Note how Hamlet accuses her openly:
Such an act
That blurs the grace and blush of Modesty,
Calls Virtue hypocrite, takes off the rose
From the fair forehead of an innocent love,
And sets a blister there, makes marriage-vows
As false as dicers' oaths.
Hamlet certainly spares her no agony in his accusations. Gertrude in Act IV scene 1 therefore has a number of problems to face. First and foremost is whether to believe her somewhat distracted son, who is rumoured to be mad and has certainly been acting that way, the arrival of the Ghost during Act III scene 7 only adding to these suspicions. Secondly she needs to think about Hamlet and how he can be protected - he has just killed the king's advisor, Polonius, and therefore will be in fear of his life. Thirdly, and perhaps more worryingly, Hamlet has all but openly accused her new husband, Claudius, with the murder of his father, her former husband. She may begin to suspect (rightfully) that she needs to protect Hamlet from Claudius, who will be looking to get rid of him and his inconvenient accusations.