At the beginning of the story the pure, innocent Faith is Brown's foil. (Just think about the colors: pink ribbons versus… brown. Yep as in, dirty, stained, and brown.)
But once Brown enters the forest, Faith becomes his foil in a different way. He's determined to resist evil; she joins the evil party in about two seconds. You could say that she represents the way Brown's spirit of self-determination contrasts with the community mentality of everyone else. Both in town and in the nightmarish forest, the residents of Salem work and worship together.
Only young Goodman Brown is strong enough (or gloomy enough) to stand apart.