22 Then came the Feast of Dedication at Jerusalem. It was winter, 23 and Jesus was in the temple area walking in Solomon's Colonnade. 24 The Jews gathered around him, saying, "How long will you keep us in suspense? If you are the Christ, tell us plainly."
25 Jesus answered, "I did tell you, but you do not believe. The miracles I do in my Father's name speak for me, 26 but you do not believe because you are not my sheep. 27 My sheep listen to my voice; I know them, and they follow me. 28 I give them eternal life, and they shall never perish; no one can snatch them out of my hand. 29 My Father, who has given them to me, is greater than all; no one can snatch them out of my Father's hand. 30 I and the Father are one."
31 Again the Jews picked up stones to stone him, 32 but Jesus said to them, "I have shown you many great miracles from the Father. For which of these do you stone me?"
33 "We are not stoning you for any of these," replied the Jews, "but for blasphemy, because you, a mere man, claim to be God."
34 Jesus answered them, "Is it not written in your Law, 'I have said you are gods'? 35 If he called them 'gods,' to whom the word of God came—and the Scripture cannot be broken— 36 what about the one whom the Father set apart as his very own and sent into the world? Why then do you accuse me of blasphemy because I said, 'I am God's Son'? 37 Do not believe me unless I do what my Father does. 38 But if I do it, even though you do not believe me, believe the miracles, that you may know and understand that the Father is in me, and I in the Father." 39 Again they tried to seize him, but he escaped their grasp.
40 Then Jesus went back across the Jordan to the place where John had been baptizing in the early days. Here he stayed 41 and many people came to him. They said, "Though John never performed a miraculous sign, all that John said about this man was true." 42 And in that place many believed in Jesus.
I started looking around at some commentaries for this chapter. www.biblegateway.com is where I pull the text for these verses and they have many commentaries for each chapter. John MacArthur has a whole study bible written to help with difficult verses. I found a few things for this chapter...
In these passages God shepherds through his designated leaders. Jesus is claiming such a role for himself, but in a way unlike anything seen before. He has made clear claims to divinity and messiahship, which will be repeated shortly (Jn 10:22-39). So when he claims to be the shepherd he is claiming that Messiah has come and in him God himself has come to shepherd his people.
And, relating specifically to Jesus speaking of 'gods'...
Jesus defends his claim using language they should be able to understand, through an appeal to the law. He cites a text that uses the word god of those who are not God: Is it not written in your Law, "I have said you are gods"? (v. 34). It is unclear who is being referred to in Psalm 82:6. Of the several proposals made by scholars (cf. Beasley-Murray 1987:176-77), the most likely takes this as a reference either to Israel's judges or to the people of Israel as they receive the law. The latter is a common understanding among the rabbis (for example, b. 'Aboda Zara 5a; Exodus Rabbah 32:7), but the former is also represented in Jewish interpretation (Midrash Psalms; b. Sanhedrin 6b; 7a; b. Sota 47b). Jesus' explanation that these gods are those to whom the word of God came (v. 35) might point to the Israelites receiving the law. In this case the contrast between these gods and Jesus would be that Jesus is the one who both fulfills the law and is greater than the law. But this expression to whom the word of God came could also refer to the judges (as suggested by the rest of Ps 82) who have received a commission from God to exercise the divine prerogative of judgment on his behalf. The psalm is actually a condemnation of the judges for not exercising their responsibility faithfully, thus corresponding both to the condemnation of these Jewish leaders in John and to Jesus as the true judge.
Many times the New Testament only makes sense when viewed through the eyes of a first century Jew. Living in Southern California in the twenty first century as a gentile, I need some help sometimes. Thankfully, this book has been dissected word by word for two thousand years and there is a lot of great wisdom out there. We can stand on the shoulders of giants and not have to guess what is being said. Remember, only the bible is inspired by God, and not anyone's commentary. But, you can get some good insight by reading what scholars have to say. Keep in mind that at no time does scripture contradict itself and anyone who would tell you that something in scripture goes against what has plainly been revealed elsewhere in the bible should probably be avoided.