The old man that Young Goodman Brown meets on the road is clearly meant to be the Devil. Brown knows from the moment he leaves on his journey that he is doing something that he should not, and as soon as he meets up with the traveler, who is clothed "in grave and decent attire," the traveler gives Brown a clear indication that there is something mysterious about him:
"You are late, Goodman Brown," said he. "The clock of the Old South was striking, as I came through Boston; and that is full fifteen minutes agone."
Here the "Old South" refers to the Old South Church in Boston, Massachusetts. Brown's journey takes him to the woods outside Salem. In modern times, the journey between Boston and Salem takes at least a half hour by car, without traffic. The fact that this traveler could move between the two locations in less than half of that time, hundreds of years ago, suggests that he has supernatural powers.
Further, throughout the journey into the woods, Young Goodman Brown repeatedly protests about continuing on. In an early, weak attempt to turn back, he says that nobody else in his family would have ever gone into the woods "on such an errand," to which the traveler replies,
"I have been as well acquainted with your family as with ever a one among the Puritans; and that's no trifle to say. 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. They were my good friends, both; and many a pleasant walk have we had along this path, and returned merrily after midnight. I would fain be friends with you, for their sake."
In other words, the traveler is very old, and has been the catalyst for or the accomplice to other wicked deeds in the past. When Brown redoubles his efforts, claiming that if he continues he will feel guilty when seeing members of the Salem clergy from now on, the traveler laughs, "shaking himself so violently that his snake-like staff actually seemed to wriggle in sympathy." His walking stick takes on the appearance of a serpent, which was a creature in the Garden of Eden, who wasn't actually a serpent but was really the Devil. As if that weren't enough evidence to convince the reader of the traveler's sinister identity, when Goodman Brown and the traveler happen upon Goody Cloyse, a revered town elder, Brown goes off the path so that he isn't seen with the traveler.
Accordingly, the young man turned aside, but took care to watch his companion, who advanced softly along the road, until he had come within a staff's length of the old dame. She, meanwhile, was making the best of her way, with singular speed for so aged a woman, and mumbling some indistinct words, a prayer, doubtless, as she went. The traveller [sic] put forth his staff, and touched her withered neck with what seemed the serpent's tail.
"The devil!" screamed the pious old lady.
"Then Goody Cloyse knows her old friend?" observed the traveller, confronting her, and leaning on his writhing stick.
"Ah forsooth, and is it your worship, indeed?" cried the good dame. "Yea, truly is it, and in the very image of my old gossip, Goodman Brown, the grandfather of the silly fellow that now is."
Here, Hawthorne puts to rest any remaining doubt as to the identity of the mysterious traveler. The man readily admits his identity to Goody Cloyse. Further, when Brown meets back up with him and issues his most defiant protest, the traveler finally leaves him behind, saying "[y]ou will think better of this, by-and-by." Hawthorne writes,
The young man sat a few moments by the road-side, 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.
Almost immediately, he hears more traffic on the path. He hides once again, and hears the what he believes to be the voices of Deacon Gookin and the minister, the two men he had just been thinking of. This seems like an amazing coincidence, until the reader considers the fact that the Devil is known to be a trickster and to have the ability to impersonate others. Further, Brown had just started patting himself on the back because he stopped going down the path. In this moment he is being very prideful. Coincidentally, pride is the very sin that got the Devil himself in trouble in the first place.
There are a number of other clues that help the reader to recognize the traveler as the Devil, including the allusion to the Egyptian Magi in the Goody Cloyse scene, the inexplicable tendency for people to disappear and weather to change, and the traveler's role at the strange witch-meeting where the trees are burning and he talks of his ability to show everyone the nature of sin. Hawthorne makes it very clear who Brown is dealing with, and Brown's clear desire to engage in the dealing is the mechanism of his downfall.