I do not believe that the story is intended to be taken as a dream--although Hawthorne leaves that possibility open as a way out for a reader who does not wish to believe what the story actually says, i.e., that everybody has an evil side to his or her nature which he or she wants to keep hidden. I do not believe that Faith and her husband resist the temptation to become a part of the secret sinners and "fiend worshippers" for the reason that they have come there voluntarily in the first place. If Young Goodman Brown was going to dream the whole story, then he would most likely have done so while he was home in his bed and not while he was out in the forest on his way to the meeting. If it was only a dream, then the accusations contained in the story would be attributable to only one fictitious character rather than to the author himself. What seems especially shocking about the story is that Faith and other young women are indicted as wicked. Hawthorne suggests a couple of ways in which women commit evil deeds:
...how many a woman, eager for widows' weeds, has given her husband a drink at bedtime and let him sleep his last sleep in her bosom....how fair damsels--blush not, sweet ones--have dug little graves in the garden, and bidden me, the sole guest to an infant's funeral.
Guy De Maupassant wrote a similar story titled (in the English translation) "Was It A Dream." It can be read online.