A woman, when she gives birth to a child, has grief (anguish, agony) because her time has come. But when she has delivered the child, she no longer remembers her pain (trouble, anguish) because she is so glad that a man (a child, a human being) has been born into the world.