Jesus - the Good Shepherd - God's Presence Among UsThis Gospel passage is a part of John 10:22-42 on Jesus' time in Jerusalem for the celebration of the feast of the Dedication of the Temple (John 10:22-23 indicates "The feast of the Dedication was then taking place in Jerusalem. It was winter. And Jesus walked about in the temple area on the Portico of Solomon.")
To understand the meaning of the passage, it would be useful to look at the history of this Feast of Dedication. In 175 BC, Antiochus IV became king in Syria. He invaded Egypt and began to spread his influence to the neighboring nations. Many Jews resisted him. However, there were members of the political and religious leadership of the Jewish people who, wanting personal gains and power, established an alliance with the king and introduced the pagan way of life to Israel. Consequently, they led the people to abandon the faith of their ancestors and God's commandments.
Eventually, the king decreed that all peoples must worship Zeus or face execution. He desecrated the Temple of God and put many faithful Jews to death. 
To defend their faith and their nation, those Jews who were faithful to the covenant and God's commandments rose up in a revolt led by the priest Mattathias and his son Judas Maccabeus. They eventually defeated the Greeks. In 164 BC, they rededicated the Temple (see 1 Maccabees 4 or 2 Maccabees 10: 1-8) and they established an annual celebration to commemorate this event.
The Feast of Dedication is the celebration of God's presence and care for God's chosen people. "The Temple was the visible sign of God's presence." Moreover, it reminds the Jewish nation that the sins of idolatry and apostasy once "led to the desecration and destruction of the Temple" and the ruin of their nation. It warns them "Never again!" and urges them to remain faithful to God's law and covenant.
Against the background of the Feast of Dedication, Jesus reveals Himself to be the new and perfect presence of God among humanity. "The Father and I are one." And Jesus invites the people to listen to him. In Him all find God.
Throughout his Gospel, John repeatedly points out that people fail to listen to Jesus. The example of their ancestors should be a warning to them.
On the other hand, those who hear the voice of the shepherd and follow him will never be lost. The Good Shepherd gives them eternal life. 
 For further reference: 1 Maccabees, chapters 1-3.
 Francis J. Moloney, SDB., The Gospel of John, Sacra Pagina series. Collegeville, MN: Liturgical Press, 1998; pages 313-315.