I'm not sure there is a definite answer to this question, and it depends on how you look at it. There are definitely dream-like qualities throughout the story. There is one point during the story that the reader could assume that Goodman Brown has fallen asleep. It is after he decides not to go further with the "devil" and sits on a stump
applauding himself greatly, and thinking with how clear a conscience he should meet the minister in his morning walk, nor shrink from the eye of good old Deacon Gookin. And what calm sleep would be his that very night, which was to have been spent so wickedly, but so purely and sweetly now, in the arms of Faith! Amidst these pleasant and praiseworthy meditations...
Because we have an image of Goodman Brown sitting and thinking, it is possible that he was not only meditating, but falling asleep. The events that take place after could be a dream.
Hawthorne, though, purposefully keeps this ambiguous. He does not tell us whether it's a dream and even mentions that it may or may not be at the end of the story. He writes, "Had Goodman Brown previously fallen asleep in the forest and only dreamed of a wild dream of a witch-meeting? Be it so if you will..." He leaved it to the reader to decide whether it is a dream, and asks the reader to take from it the moral lesson- that any man can be infected by sin.
he came in hot
In response to this answer: "He leaved it to the reader..." and you're an English teaher!?!?!?!