The origin of Pentecostalism must be understood against the backdrop of a revival of tongues-speaking that occured in 1901 in Topeka, after which Charles Parham formulated a new doctrine of Spirit-baptism. He taught that baptism in the Spirit is a third work of grace, separate to conversion and sanctification, with the initial evidence of tongues-speaking.
The Topeka Revival sowed the seed of Pentecostalism.  Charles Parham had grown up in Methodist and Holiness circles. Following the lead of many others in this movement he strongly emphasised the gifts of the Spirit, including healing.
Parham had been influenced significantly by Benjamin Irwin and Frank Sandford. Following Stanford, Parham understood tongues to have a preaching function. Consequently he and his followers were among those hoping to receive the power of the Spirit to rapidly evangelise the world at the turn of the nineteenth century by speaking in other languages.
Like Irwin he understood baptism in the Spirit to be a third work of grace empowering the believer and gifting them for evangelism. He taught that those who had been converted and had gone forward to entire sanctification (Wesley's Christian perfection) should expect a baptism of “the Holy Spirit and fire.”
Parham was part of a Bible study group which was made up of some of his students and several Baptist ministers. After studying of the Book of Acts, Parham came to his conclusion that tongues was the “initial evidence” of Spirit baptism based on the narrative literature of Acts and the longer ending of Mark. Tongues in Acts seem to have the function of providing evidence of Spirit baptism. Following the pattern of other “restorationists,” he elevated this factor in the history of the Church to doctrinal standing.
Convinced by their study, and after much prayer, Parham and his students and fellow ministers reported their own practice of tongues-speaking, although only sporadic instances had occurred. After their experience with tongues, Parham formulated the doctrine of “initial evidence” (that tongues-speaking is the initial evidence of Spirit baptism). He is the one who pioneered this doctrine of tongues as a special sign of Spirit baptism. Because he was the first to insist on tongues as the necessary evidence of this subsequent work of Spirit baptism he is the origin of this basic distinctive in Pentecostalism today.
Following Benjamin Irwin however, Parham still taught that Spirit baptism was a third work of grace (conversion and sanctification being the first and second respectively).
Although under Charles Parham only sporadic instances of tongues-speaking occurred, what had begun in Topeka was the seed that directly resulted in the amazing growth of Pentecostalism out of the Azusa Street meetings under William Seymour. 
The Azusa Street Revival of 1906-1909 was the beginning of Pentecostalism. Before William Seymour went to Los Angeles he had been influenced by Parham in Topeka. He was a former student of Parham at his Bible school and as a result Seymour inherited Parham's unique doctrine of Spirit baptism with tongues speaking at the “initial evidence,” and used the platform at Azusa Street to teach this. Seymour also borrowed heavily from John Wesley’s Doctrines and Discipline. 
Parham's legacy and the events surrounding him in Topeka also contributed to the Azusa Street revival by fueling the escatological expectancy of a “latter rain” outpouring of the Spirit. The widespread burden for evangelism, coupled with this theological backbone, inspired a global outreach that has accompanied the Pentecostal movement since its beginning.
When tongues-speaking re-occurred at the Azusa Street meetings Seymour announced in excitement in his newspaper (the Apostolic Faith) that the “latter rain” of Joel 2:23 had come. News quickly spread overseas through the newspaper and by secular media like the Los Angeles Times and then even more so by visitors from around America and overseas who travelled back from the Azusa Street meetings.
While the majority of Holiness leaders rejected this revival and the doctrine of Parham and Seymour, the young leaders from more radical Holiness groups came to investigate the phenomenon on display there.  The Azusa Street meetings were characterised by spontaneous prayer and preaching and the active participation of women. In addition, an unparalleled inter-racial makeup of the services also highlighted the revival, accompanied by a message of reconciliation. In particular, however, visitors witnessed what they saw to be evidence of a special post-conversion baptismal experience of the Holy Spirit. Those that were convinced carried home with them this new teaching, and Pentecostalism began as a wold-wide movement.
“Pentecostalism made its greatest inroads where Holiness movements were already prospering, and it attracted far more non-Methodists than had the earlier forms of perfectionism. Besides the emphasis on the baptism of the Holy Spirit, Pentecostalism recognized divine healing and demanded highly puritanical standards of personal conduct. Like the Holiness groups the Pentecostals were theological conservatives, and they comprised an important addition to the Arminian wing of Protestant conservatism in the period when the fundamentalist movement was gathering steam.” 
To summarise, the rapid beginning of Pentecostalism can be understood against the backdrop of a revival of tongues-speaking in Topeka, 1901, after which Charles Parham formulated the doctrine of “initial evidence:” that tongues-speaking is the initial evidence of Spirit baptism, which he understood to be a separate work of the Spirit to conversion and sanctification. Then when the re-occurrence of tongues speaking at the Azusa Street meetings from 1906-1909 gained a worldwide audience, William Seymour, a former student of Parham, used the revival as a platform to teach this new doctrine of Spirit baptism. Visitors witnessed this first-hand and then carried the new teaching abroad.
But what of the early decades of the twentieth-century after the birth of Pentecostalism? What controvercies arose in the infancy of this movement? And what place did they have in defining the Pentecostalism of today? In the next article we'll be talking about how Pentecostalism was shaped in its early years.
How Pentecostalism developed over time
Why Pentecostalism was successful
Where Australian Pentecostalism came from
 Vinson Synan (Ph. D., University of Georgia), “Pentecostalism,” Evangelical Dictionary of Theology, 2nd Ed., Paternoster Press, 2001, p. 900.
 Grant. R. Osborne (Ph.D., University of Aberdeen), “Tongues, Speaking in,” Evangelical Dictionary of Theology, 2nd Ed., Paternoster Press, 2001, p. 1208.
 Mark A. Noll (Ph.D., Vanderbilt University), “Azusa Street Revival,” Evangelical Dictionary of Theology, 2nd Ed., Paternoster Press, 2001, p. 125.
 Richard. V. Pierard (Ph.D., University of Iowa), “Holiness Movement, American”, Evangelical Dictionary of Theology, 2nd Ed., Paternoster Press, 2001, p. 565.  The Oxford companion to Christian thought / edited by Adrian Hastings ... [et al.], Oxford : Oxford University Press, 2000, Pentecostalism.
talkingpentecostalism.blogspot.com | joe towns: christian discussion on pentecost, charisma, pentecostal and charismatic beliefs, the Bible and Jesus; including the origin and history of pentecostalism, baptism in the Holy Spirit, speaking in tongues, gifts and miracles, divine healing and word of faith, prosperity and wealth, praise and worship, guidance and hearing the voice of the Holy Spirit.