How one answers this question is dependent upon whether one believes the devil (and the supernatural) is real, I suppose. For me, Goodman Brown's experience in the forest was a dream, but a dream that showed him the reality of people's hearts and ruined his ability to believe in his friends and family for the rest of his life.
Nothing in the tale seems real. The older man he meets is only "about fifty years old," but says, "I helped your grandfather, the constable, when he lashed the Quaker woman so smartly through the streets of Salem. And it was I that brought your father a pitch-pine knot, kindled at my own hearth, to set fire to an Indian village, in King Philip's War." This is impossible, of course, unless he's ageless.
I suppose my biggest reason for arguing that this is a dream is that nothing is explained to anyone, either in the story or to the readers of the story. The reasons for Goodman Brown's going on the errand are obscure; he doesn't even seem to know. Also, he seems hell-bent (so to speak) to meet with the dark lord, but also reticent about being seen with him. This is not explained, either. His wife doesn't ask where he's going and we aren't told why "this night of all nights" is a bad night to be out. The fact that the whole story is so surreal and unexplained points to its being a dream, the only situation I know of where stories unfold with odd occurrences without questions or explanations.