After Hamlet mistakenly kills Polonius, he continues his rant against Gertrude. She keeps asking him to stop. Hamlet’s father, the Ghost, enters and speaks to Hamlet. Hamlet replies and Gertrude asks:
Alas, how is’t with you,
That you do bend your eye on vacancy
And with the incorporal air do hold discourse?
Again, Hamlet asks if she can see the Ghost. She cannot and the Ghost exits. At this point, she must think Hamlet is mad. But then Hamlet tells Gertrude that he is not mad (crazy). He is distraught by her and Claudius’ crime and this is why he speaks to the air (Ghost). He asks here to confess her sins and avoid getting into bed with Claudius. Hamlet then asks Gertrude to convince the king that he is mad. This is to prevent Claudius from supposing any plot of revenge.
I don’t think we can be sure about whether Gertrude thinks Hamlet is mad or not at this point. She saw him speak to the “incorporal air,” but he told her he was not mad. Later, Gertrude does what Hamlet asks and tells Claudius that Hamlet is mad. Since she goes along with this, we can assume that it is more likely that, by the end of this scene, Gertrude does not think Hamlet is mad.
Gertrude is a difficult character. It is never clear how much, if at all, she was involved with Claudius' plot in killing the king.
If you look to the beginning of the very next scene you see this exchange:
Claudius: What, Gertrude, How does Hamlet?
Gertrude: Mad as the sea and wind, when both contend
Which is the mightier. In his lawless fit,
Behind the arras hearing something stir,
Whips out his rapier, cries, 'A rat, a rat',
And, in this brainish apprehension kills
The unseen good old man.
And a little further on:
Claudius: ...Where is he gone?
Gertrude: To draw apart the body he hath kill'd,
O'er whom - his very madness, like some ore
Among a mineral of metals base,
Shows itself pure - he weeps for what is done.