The way in which the threat to the children is constructed in The Turn of the Screw, by Henry James, begins with the governess's vision of Miss Jesselby the pond and the vision of Peter Quint from at the top of the house looking down at her. This is the first hint that we get, as readers, that our main character is in imminent danger. Equally, the information we get from Mrs. Grose assures us that the children are in danger as well.
Let's remember, however, that the story is indeed about a haunting. The governess only begins her spiral downfall towards insanity as a result of the evil presence of the former governess and the former valet. Miss Jessel and Peter Quint are indeed interested in haunting the children, whom they either violated or abused during their lifetime.
The idea of the governess insanity, therefore, moves the plot forward by making the reader wonder exactly what is going on: Is it isolation? Is it the house, itself? Is it the children? Either way, the governess does avert and warn against the possibility of danger. She is simply the last victim of it in the desperate attempt she has of saving the children.