King's story diverges from Hawthorne's in several ways. King's is a first-person narrative, while Hawthorne's is third-person. Further, King's narrative tells the story of a nine-year-old boy while Hawthorne's is the story of a grown man who has recently married. Both characters, however, think their encounter with evil was real. Gary, late in life, writes:
Yet of all the memories, the one of the man in the black suit is the strongest, and glows with its own spectral, haunted light. He was real, he was the Devil, and that day I was either his errand or his luck.
A more significant divergence and one that addresses the second question is how Gary's reaction to an encounter with devil or evil impacts him. Young Goodman Brown is outwardly directed in his response to his experience of evil in the sense that he comes to distrust the people around him. He sees himself as pure and the rest of his peers as dishonest sinners.
Gary, in contrast, retains a generous view of others. He is more worried about why he had an encounter with the devil, with the implication that there is something in him that might have inspired the visit. This can be seen in the above quote, in which Gary writes he doesn't know if he met the devil because it was "his [the devil's] errand or his luck." In other words, did the devil intentionally seek Gary out or did he stumble across him by accident? If it was by intent, Gary has to worry that there is something wrong inside him and, as he notes, that the devil might come back for him—and this time he will be too old to run.
Goodman Brown lacks the introspection or a sense of his own capacity for evil that Gary has. He never thinks that he too was at the Satanic service that has so set him against the people in his life.