Lady Macbeth's guilt is coming out in her sleep. These lines show the disorder in her mind. Interspersed between her refences to Duncan are references to her other deeds. In her dreams, even the original deeds have changed. Where once a little water washed her hands clean, now all the perfumes in Arabia won't work. The knocking at the gate she refers to has more than one meaning. It is a direct reference to the porter in Act 2, and yet this time it is different. She needs to go to bed, to put the problem to rest (Even in her stressed state, she counsels this, telling herself that what's done cannot be undone). Yet just as Macbeth couldn't follow her advice earlier, she can't follow her own now. Earlier in the play, the knocking at the gate was a reminder to hide so that she wouldn't appear guilty; now there is nowhere to hide. She can go to bed, but she can't rest.
The gate has become the gate to her subconscious: something wants out.
This is Lady Macbeth speaking while sleepwalking. She's recounting the events the night they killed Duncan. Remember that they felt rushed to kill Duncan without anybody learning of the deed. Once he was dead, they heard someone knocking at the gate and had to rush off to bed to pretend they'd been asleep the whole time.