Although John thinks that he is helping his wife, Jane, by keeping her isolated and inactive, this is actually an imprisonment and leads to Jane's breakdown. The yellow wallpaper lines the wall of her room. They are the metaphorical prison bars of her incarceration. So, John is comparable to the wallpaper in the sense that he basically imprisons her and the wallpaper coats the actual walls of her prison.
John is condescending to Jane, telling her that he knows best. And his advice is really a command that Jane must stay in this room and be as inactive as possible. This illustrates the gender roles of this time (1892) and how men were deemed to be the active, controlling members of relationships and marriages. Women were supposed to be passive and inactive, while avoiding stress and work. So, the author focuses on these roles and shows how John treats Jane more like a child than an equal partner in marriage. He actively imprisons her and she reluctantly acquiesces because the marital and gender roles prescribe that she must obey her husband. Since he is the one most responsible for imprisoning her, it is logical to compare him to the actual walls of her prison. So, yes, John is comparable to the yellow wallpaper. He represses her and so do the walls themselves.
Jane wishes to escape from this room but she doesn't want to disobey John. Being stuck in the room, she begins to hallucinate and lose her sanity. She starts seeing a woman trapped in the wallpaper. Then she sees even more women:
And she is all the time trying to climb through. But nobody could climb through that pattern - it strangles so; I think that is why it has so many heads.
In addition to symbolizing John's dominating role, the wallpaper now symbolizes how all women have historically been imprisoned. Jane even supposes that she, like the imaginary women, is imprisoned in the wallpaper. In escaping the wallpaper, she symbolically escapes John's domination. Unfortunately, by this time, her imprisonment has led to madness.