Old Testament contains many remnants of polytheism, including a council of gods and gods of other nations, and even mentions dozens of them by name, including Baal, Ashtoreth and Molech. The fact of early biblical polytheism is admitted and explained away in some Christian apologetic texts such as this one, but there is no question that Hebrews were polytheistic, and eventually settled on monotheism, at which time they attempted to clean up some of their scriptures to make clear the dogma of one god, as seen in Isaiah 45:5–6. It is believed by most scholars that the Hebrew god Jehovah (or Yahweh) was the chief god of the Hebrew people (as one of numerous peoples of the time, who each had their own state religions and their own gods), and over time came to be viewed by the Hebrews as the chief of all gods, and eventually as the one and only God. Nova discusses the polytheistic roots of Judaism.
But in fact, of the three major Abrahamic religions, neither Jews nor Muslims regard Christianity as being truly monotheistic. This is primarily for one main reason: the Christian concept of the trinity, and especially the divinity of Jesus. There is no concept or mention of a trinity to be found in the Old Testament (although Christians can manage to find passages that they interpret to support the notion). No notion of anything like Jesus the Son is to be found there. But in the move toward monotheism, there was an effort to wipe out the notion of any godly beings other than Jehovah. Clearly the Hebrew roots of Christianity have no concept of a trinity, and that monotheistic tradition continues to this day in the Jewish faith, as well as Islam.
So we have to look to the New testament to find an explanation of this core Christian concept, right? Wrong. It turns out that the idea of the trinity post-dates the NT. Early manuscripts of the NT contain absolutely no mention of this doctrine. Even in the more modern versions of it, there is scarcely any mention of a trinity. The so-called Johannine comma, in 1 John 5:7-8, is the main source of scriptural support for the trinity.
For there are three that bear record [in heaven, the Father, the Word, and the Holy Ghost: and these three are one. And there are three that bear witness in earth], the Spirit, and the water, and the blood: and these three agree in one. (KJV)But it is widely believed among biblical scholars that the words in brackets were inserted into the biblical text centuries after the original book was written. It makes its first appearance in some 7th century Latin manuscripts, and eventually finds its way to others, including the Latin Vulgate. - Wiki
With these additional words inserted into the New Testament, Christians can claim to have scriptural support for the trinity, but without them, they have essentially nothing but loosely interpreted passages, much like the situation with the Old Testament. The striking thing about this is that this doctrine is at the very heart of Christianity, and those who don't accept it are considered to be heretics. Needless to say, that implies that the original authors of the NT were heretics, and even Jesus himself would have to be considered a heretic, because he thought of God the Father as being a separate person from himself, as indicated in Mark 13:32, for example. The book of Mark, which is the oldest of the gospels, appears do be an adoptionist document, which holds that Jesus was born as an ordinary human, but was adopted by God and given special status as God's earthly messenger at the time of his baptism. It contains no mention of any divine birth, or death as atonement for the sins of man. Obviously, these ideas came along after Mark was written.
But what makes the trinity doctrine a mystery is not so much its disputed origins in the text of the NT, but the way in which it is to be understood. What does it mean to say that God is three persons in one? The concept is not consistent with modality (that is, appearing in different forms at different times). Nor is it consistent with composition (god is divinely simple - not composed of separate parts). It is often regarded as three aspects of the same thing, yet by all appearances, each of the three persons of the trinity has a distinct nature and a distinct role in Christian theology. Even the church can do little more than explain this as a "mystery".
The mystery of the Most Holy Trinity is the central mystery of Christian faith and life. It is the mystery of God in himself. It is therefore the source of all the other mysteries of faith, the light that enlightens them. It is the most fundamental and essential teaching in the "hierarchy of the truths of faith".56 The whole history of salvation is identical with the history of the way and the means by which the one true God, Father, Son and Holy Spirit, reveals himself to men "and reconciles and unites with himself those who turn away from sin". - Catechism of the Catholic ChurchWhy the need for this bizarre version of monotheism? I think it stems mainly from the elevation of Jesus as a messenger of the word of God (originally), to becoming a fully divine person in his own right, which was not the prevailing view when the first texts of the NT were written. But this obviously conflicts with the strongly held idea of monotheism, so Christians had to come up with a way to harmonize two contradictory beliefs. And once you have have two persons in one, it's not hard to justify a third person (the holy spirit - the seat of consciousness and wisdom) to round it out. By having three co-equal persons in God instead of just two, Christian theologians of the fourth century avoided the making the Son subordinate to the Father. The holy spirit was officially adopted as doctrine near the end of the fourth century, in the Council Of Constantinople. This was after a long-running dispute over various competing ideas, which were then declared to be heretical. See The Surprising Origins of the Trinity Doctrine.
The three persons of the trinity are said to be co-equal. Each is understood as an aspect of God, but at the same time, each is not the same as the others. If you think this is a strange notion of a single god, you're not alone. Even the Catholic church, instead of providing a cogent explanation, calls it a mystery, and they're the folks who came up with the idea. But it is evident all this was deemed necessary to incorporate Jesus as a divine being into a monotheistic belief system. So the way it came about is not really much of a mystery. Perhaps the biggest mystery in all this is the fact that Christians think this idea of the trinity makes some kind of sense from the perspective of logical coherency and understanding of a divinely simple monotheistic god.