The distinguishing feature of Islam is its insistence on absolute monotheism and the forbidding of anything, at all, to be associated with God. This includes the refusal of the idea that Jesus (peace be upon him), the Messenger of God, was God. Allah says in the Qur'an:
Surely they have disbelieved who say that Allah is the Messiah [Jesus], the son of Mary. But the Messiah said, "O Children of Israel, worship Allah, my Lord and your Lord. Truly, whoever sets up partners in worship with Allah, then Allah has forbidden Paradise for him, and Fire will be his abode. And for the wrongdoers there are no helpers. Surely, they have disbelieved who say, "Allah is the third of three," for there is no God but Allah Who is one. And if they do not cease what they say, verily, a painful torment will befall the disbelievers among them.... The Messiah, the son of Mary, was nothing other than a messenger; many were the messengers who passed before him. His mother was a woman of truth.... (5:72-75)
Muslims believe that neither the Old Testament nor the New Testament had mentioned in any way that Jesus was the son of God. According to a contemporary American scholar, Barbara Brown:
The doctrine of divinity states that Jesus is the Son of God, the Word of God made flesh. Even though Jesus himself never claimed to be divine, Paul gave him this attribute for one reason - to gain converts among the Gentiles. The Gentiles were pagans who were used to worshipping gods that had wonderful legends and myths behind them. Several of the pagan deities of the time such as Mithras, Adonis, Attis, and Osiris were all the offspring of a supreme ruling god, and each had died a violent death at a young age, coming back to life a short time later in order to save their people. Paul took this into account, giving the pagans something similar in Christianity. He attributed divinity to Jesus, saying he was the Son of God, the Supreme, and that he too had died for their sins. In doing so, Paul compromised the teaching of Jesus with pagan beliefs in order to make Christianity more acceptable to the Gentiles.
The term "son of God" was not something new. However, it had been used in the Old Testament to refer to David (Saul 2:7) and his son Solomon (I Chronicles 22:100) and to refer to Adam (Luke 3:38) in the New Testament. In his famous Sermon on the Mount, detailed in Matthew 5, Jesus tells his listeners, "Blessed are the peacemakers, for they shall be called sons of God." In all cases, the term "son of God" was not meant to be applied literally but to signify love and affection from God to the righteous. "Son of God" means a special closeness to God, not to be of God. After all, people are sons of God, and Allah is the creator of all life.
Christians who lived during the time of Jesus (peace be upon him) believed that he was the divine messenger to them, bringing them the words of God and guiding them. However, after the ascension of Jesus to heaven, Saint Paul, who was deeply influenced by Roman paganism, wanted his preaching of Christianity to be more appealing to the Gentiles, so he compromised the teachings of Jesus (peace be upon him) by adopting certain pagan ideas and interpolating them into Christianity. Thus, the idea of the trinity spread even though it was not part of the original teachings of Jesus (peace be upon him).