The big question about this passage is why Jesus seems to give the cold shoulder to the Canaanite woman who requests his help. Her plea for her demon-possessed daughter is exactly like all the other needs that Jesus has attended to without protest. He has already cast out demons from the two men of the Gadarenes (8:28-34), raised a young girl from the dead (9:18-26), and even healed the servant of a Gentile centurion (8:5-13), so surely this woman's request isn't unreasonable.
The reason Jesus gives is that his primary mission is to the Jews, not Gentiles. He tells his disciples, "I was sent only to the lost sheep of the house of Israel." And to the woman he is even more plain: "It is not good to take the children's bread and throw it to the dogs [a derogatory reference to Gentiles]." The question is whether Jesus is just being facetious in making this remark, or if he really is telling her to get lost.
Some people think that Jesus is merely engaging in verbal sparring with the woman, that while his words seem harsh he is actually encouraging her with a knowing look, and she in turn understands that she should persist in asking him to heal her daughter. In other words, Jesus gets her to play along in this conversation for the benefit of the disciples, who need to be instructed about the inclusion of Gentiles into the kingdom. The merit to this theory is that it explains Jesus' seemingly perverse behavior toward this clearly desperate woman. The one who famously offered living water to the Samaritan woman at the well in John 4 does not sound like someone who would reject an entreating Gentile woman so out of hand. And how else can you explain why Jesus would call her a dog? That sounds like something a Pharisee would say, not Jesus.
Yet on the other hand the text doesn't give any hint that Jesus is merely sparring with the woman, or that he is speaking "with a twinkle in his eye" as some commentators put it. Even the disciples read Jesus' body language as one of disinterest, which is why they are bold enough to ask him to send the woman away. The last time they asked Jesus to send people away, they got rebuked and ended up feeding a multitude of five thousand! So they must be reading Jesus as already annoyed by her, otherwise they wouldn't risk making this request. Furthermore, when Jesus tells them, "I was sent only to the lost sheep of the house of Israel," he is echoing his commission to the disciples back in 10:5-6 when he said, "Do not go in the way of the Gentiles, and do not enter any city of the Samaritans, but rather go to the lost sheep of the house of Israel."
I've landed somewhere in the middle. I don't think Jesus is giving any visible encouragement to the woman, but it does seem that he is testing her. For a Gentile the woman is surprisingly educated about the Jewish faith, addressing Jesus properly as "Son of David" and even coming up and worshiping him. Perhaps Jesus knows that she is not far from the kingdom, and yet her knowledge of these proprieties doesn't satisfy him. He wants to push her. She knows she is an outsider. She knows she doesn't "deserve" the blessings of the covenant. Why should he help her? What claim does she have on him?
The woman answers that she doesn't have a claim on him, that she knows she is merely a dog beneath her masters' table, yet she points out that even a dog can lick up the crumbs that fall to the floor. By saying this she reveals her insight into the Son of David, which is that he will not turn away even the unworthy, that he is merciful to the outsider, that his blessings are so rich an unclean dog needs only a crumb to find satisfaction.
Jesus is amazed. "O woman," he says, as if her answer has pierced him straight to the heart. This woman knows that he cannot deny her, because that is the essence of who he is. She knows it. And he knows that she knows it. And now she knows that he knows that she knows it. What can Jesus do in the presence of such faith except grant her her request? "O woman, your faith is great. Be it done for you as you wish."