In Luke 4:16-30, we have Jesus’ first recorded public sermon, where he speaks in the synagogue of his hometown of Nazareth. The text is noted for what seems to be a dramatic shift in his listeners’ attitude—they go from an initially favorable impression of Jesus to wanting to throw him over a cliff by the end.
This is because when Jesus reads from the prophet Isaiah (“The Spirit of the Lord is upon me . . .”) and declares that he himself is the fulfillment of Isaiah’s words, we read:
And all spoke well of him and marveled at the gracious words that were coming out of his mouth. And they said, “Is not this Joseph’s son?” (Luke 4:22, ESV).
It gives the impression that they were impressed by his eloquence and were quite positive about him. At the end of the story they try to kill him, and it raises the question of what Jesus said or did that brought such a dramatic turnaround.
But I do not think there was a turnaround; the crowd in the Nazareth synagogue was ill-disposed toward Jesus from the beginning. The ESV translation given above is overly interpretive and creates a dramatic problem where none exists.
Translated literally, the statement is this: “And all were bearing witness about him and were marveling at the words of grace coming from his mouth; and they were saying, “Is this not the son of Joseph?”
The ESV takes the verb μαρτυρέω (martureo) as “speak well of.” It really just means to “testify” or to “bear witness,” but whether positively or negatively depends on context (see Matthew 23:31 for the negative sense). One commentator acknowledges this but still takes it as “speak well of” because “gracious words” would seem to suggest that there was a positive response from the hearers. This might be the case if “gracious words” just meant something like “eloquence” or “kindness,” but the phrase actually is “words of grace,” and is not a reference to Jesus’ manner of speaking but the content of it, which was the announcement that the current time was “the year of the Lord’s favor” announced by Isaiah (v.19). The phrase “word of grace” is used elsewhere by Luke (in Acts 14:3) as a reference to gospel proclamation, and that is what it means here. They were not impressed with his words, they were amazed (in the skeptical sense) that he was telling them that the time of the Lord’s favor was now. They doubted it, and their question confirms this—Asking “Is not this Joseph’s son?” is not a compliment, but a scoff.
Compare for example the same question in Matthew 13:55-57,
Is not this the carpenter’s son? Is not his mother called Mary? And are not his brothers James and Joseph and Simon and Judas? And are not all his sisters with us? Where then did this man get all these things?
They were trying to put Jesus in his place. This is why Jesus responds with a rebuke: “And he said to them, ‘Doubtless you will quote to me this proverb, “Physician, heal yourself”’” (v.23; he responds very similarly in the Matthew passage just cited). This only made them angrier, and by the end they were ready to kill him. But their attitude had not flipped; it just intensified. They went from skeptical to outright opposed. He had told them that the year of God’s grace and favor was now, and they testified against him with their scoffing, amazed that he would claim God's grace had come.
By being overly interpretive and giving the verse a positive spin, popular English translations have obscured the meaning.
 “They were all speaking well of Him and were amazed by the gracious words that came from His mouth, yet they said, “Isn’t this Joseph’s son?” (HCSB)
“And all were speaking well of Him, and wondering at the gracious words which were falling from His lips; and they were saying, “Is this not Joseph’s son?” (NASB)
“All spoke well of him and were amazed at the gracious words that came from his lips. “Isn’t this Joseph’s son?” they asked.” (NIV)
“So all bore witness to Him, and marveled at the gracious words which proceeded out of His mouth. And they said, “Is this not Joseph’s son?” (NKJV)