Here is one of those times where context helps quite a bit.
John 10:33-36 (NIV)
33 “We are not stoning you for any good work,” they replied, “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 Scripture cannot be set aside— 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’?
Emphasis mine, of course. The part in bold made me think that these were prophets, but let's check the reference to be sure.
Psalm 82 (NIV)
A psalm of Asaph.
1 God presides in the great assembly;
he renders judgment among the “gods”:
2 “How long will you defend the unjust
and show partiality to the wicked?
3 Defend the weak and the fatherless;
uphold the cause of the poor and the oppressed.
4 Rescue the weak and the needy;
deliver them from the hand of the wicked.
5 “The ‘gods’ know nothing, they understand nothing.
They walk about in darkness;
all the foundations of the earth are shaken.
6 “I said, ‘You are “gods”;
you are all sons of the Most High.’
7 But you will die like mere mortals;
you will fall like every other ruler.”
8 Rise up, O God, judge the earth,
for all the nations are your inheritance.
Huh, this passage seems to be talking about judges, not prophets. However, remember that in ancient Israel, judges and prophets were often the same people1.
Now the question becomes: why call these people "gods"? One readily apparent reason is that God is the great Judge, hence these judges are gods in that sense. Another, less clear and more speculative reason, has to do with them being prophets. Taking parts of two verses and putting them near each other...
John 10:35b - to whom the word of God came
Psalm 82:6b - you are all sons of the Most High
...it would seem like they are related by God's Spirit somehow. An analogue can be found in the New Testament with regards to Christians being brothers and sisters in Christ.
Hebrews 2:11 (NIV)
11 Both the one who makes people holy and those who are made holy are of the same family. So Jesus is not ashamed to call them brothers and sisters.
Romans 8:29 (NIV)
29 For those God foreknew he also predestined to be conformed to the image of his Son, that he might be the firstborn among many brothers and sisters.
Similarly, God's prophets could be called "gods" due to their association with the Holy Spirit.
1 If someone could point me to a source for this, I'd greatly appreciate it.