This is the historical record regarding The Temple and the Samaritans from the Bible.
Moses instructed the Israelites that there should be only one place of worship.
Deuteronomy 12:8-11 (NIV)
You are not to do as we do here today, everyone doing as they see fit, since you have not yet reached the resting place and the inheritance the Lord your God is giving you. But you will cross the Jordan and settle in the land the Lord your God is giving you as an inheritance, and he will give you rest from all your enemies around you so that you will live in safety. Then to the place the Lord your God will choose as a dwelling for his Name—there you are to bring everything I command you: your burnt offerings and sacrifices, your tithes and special gifts, and all the choice possessions you have vowed to the Lord.
Later King Solomon built the Temple in Jerusalem and God approved it for the one place of Worship.
1 Kings 9:3 (NIV)
The Lord said to him: “I have heard the prayer and plea you have made before me; I have consecrated this temple, which you have built, by putting my Name there forever. My eyes and my heart will always be there.
After The Kingdom of Israel was destroyed and the people were exiled to Assyria and other places, (many of the tribes of Israel were lost till today) the empty place of Samaria was occupied by foreigners, who were latter called Samaritans even at the time of Jesus.
2 Kings 17:24-29 (NIV)
The king of Assyria brought people from Babylon, Kuthah, Avva, Hamath and Sepharvaim and settled them in the towns of Samaria to replace the Israelites. They took over Samaria and lived in its towns. When they first lived there, they did not worship the Lord; so he sent lions among them and they killed some of the people. It was reported to the king of Assyria: “The people you deported and resettled in the towns of Samaria do not know what the god of that country requires. He has sent lions among them, which are killing them off, because the people do not know what he requires.” Then the king of Assyria gave this order: “Have one of the priests you took captive from Samaria go back to live there and teach the people what the god of the land requires.” 28 So one of the priests who had been exiled from Samaria came to live in Bethel and taught them how to worship the Lord. Nevertheless, each national group made its own gods in the several towns where they settled, and set them up in the shrines the people of Samaria had made at the high places.
Mount Gerazim was regarded as a place of blessing.
Deuteronomy 11:29 (NIV)
When the Lord your God has brought you into the land you are entering to possess, you are to proclaim on Mount Gerizim the blessings, and on Mount Ebal the curses.
Later, the Samaritans selected it for the Place of Worship.
See this wiki page for more on Mount Gerizim.