“The major milieu out of which Pentecostalism sprang was the worldwide Holiness movement, which had developed out of nineteenth-century American Methodism.”(Vinson Synan, Ph.D., University of Georgia, 2001) .
To be consise, Pentecostalism developed in the early twentieth-century from the Holiness movement, which developed from American Methodism in the nineteenth-century, which developed out of eighteenth-century Weslyan theology. However, the theological roots of Pentecostalism are more complex than American Methodism alone.
In the 1830s until the end of the nineteenth-century a revival of tongues-speaking occurred in England that was the forerunner to twentieth-century Pentecostalism. The revival occurred during the ministry of Edward Irving. Understanding where Pentecostalism came from involves understanding the legacy of Edward Irving and the importance of nineteenth-century premillennialism.
Nineteenth-century Premillennialism (Irving’s legacy) 
Edward Irving (1792-1834) is considered to be a forerunner of Pentecostalism . He was a Church of Scotland (Presbyterian) minister, with a congregation in London. He believed himself to be a prophet of God and sought to reintroduce a charismatic dimension to Protestantism.
Irving developed a charismatic sacramentalism. He believed that much of the power of the Reformation lay in its sacramental theology, and so in response he stressed the presence and power of the Spirit in baptism.
Later he developed a charismatic eschatology. After meeting some of the first Anglican premillennialists  he began to believe in a period prior to the Second Coming when a “latter-rain” outpouring of the Holy Spirit would occur. This was grounded in his apocalyptic exposition of biblical prophecy. Irving was the first major populariser of this theology because of his many published works on prophecy and the Albury Park prophecy conferences, which he organised. 
It was Irving’s apocalyptic interpretation of biblical prophecy that influenced one of the most significant fathers of this movement, John Nelson Darby (1800-1882), to adopt this new understanding. Darby was a leader in the Brethren movement who went on to develop a new system of eschatology called “dispensationalism.” Dispensationalism went against the teaching of all of Church history by teaching that the Second Coming of Christ would occur in two stages, the first being a secret “rapture” of true believers, and the second being the Second Advent. Many from Darby’s own group, the Plymouth Brethren, went on to become enthusiastic preachers of dispensational premillennialism. 
Next Irving formulated a charismatic Christology, teaching that in the incarnation Jesus received a fallen nature, but the activity of the Spirit in his life kept him from sinning.
It was during this time that Irving began to teach that the “extraordinary” gifts would be given again by the Spirit to the church in the period just prior to the Second Coming of Christ. This conviction led him to wait in expectation for this to occur in his life time.
Then in 1830 Irving learned that speaking in tongues had been reported in Scotland. It was not long after this that Irving himself reported manifestations of tongues-speaking in his Regent Square Church. From then on Irving made tongues-speaking the central focus of his church meetings.
Shortly after this time, in 1833, Irving was disposed by the Church of Scotland General Assembly for his teachings. Almost all of his followers joined the Catholic Apostolic Church and until the end of the century his followers made tongues-speaking characteristic to their church life.