The passage is found in Matthew 15:21-28. Jesus is in the region of Tyre and Sidon when a Canaanite woman asks him to heal her daughter.
Jesus initially seems to ignore her, then says he was sent only to the lost sheep of Israel. The woman persists, and Jesus praises her faith, using an analogy about dogs eating crumbs from the table.
The term "dog" was not an insult in that cultural context. Jesus used a familiar analogy to highlight the woman's humble faith. Context is vital for accurate interpretation.