It all depends on how you define it. Some would claim that the roots of the idea go back to Augustine. Augustine made a sharp distinction between the body of the elect known to God alone (which might include people currently outside the Church and certainly didn’t include all the baptized) and the visible Church made up of the baptized. He did not use the term “invisible Church,” and people argue over whether his teaching can really be put in this category. It is fair to say, though, that later theories of the invisible Church built on Augustine, even though they went in directions he did not.
In the late Middle Ages certain unorthodox reformers such as Wycliffe and Hus took Augustine’s idea of predestination as the basis for the “true Church.” They argued that the elect were the Church in the sense that counted most, and that if the Pope (in particular) was a wicked person and hence evidently not elect that meant that he was not truly the leader of the Church. (This is the best way I can simplify their views–it’s a complex issue and I don’t think I’m doing it justice.) Both were condemned as heretics, Wycliffe after his death; Hus was not so lucky and was burned at the stake (not only for this, but ecclesiology was probably the biggest issue at stake–yes, I know that’s a grim pun

)
The Protestant Reformers picked up on this idea and worked it out more systematically. Calvin is perhaps the best example of the classic Protestant position (Luther if anything stressed the invisible Church more and had less regard for councils, tradition, etc.). Calvin believed that the invisible Church was the body of elect known to God alone, while the visible Church was made up of all those local churches where the Word of God was preached and the Sacraments were duly administered. But there’s a catch–obviously the purity of doctrine and correctness of sacramental practice admits of more and less. You could have a church that was basically correct but had some errors (Calvin thought this was true of the Lutherans, and might even have admitted that in principle it was quite possibly true of his own church), or on the other hand you could have a church that had so corrupted the Word and Sacraments that it was barely a Church at all (Calvin thought this was true of the Catholic Church–IMHO he played a double game by this kind of language, treating Catholicism as apostate to justify complete separation, but granting some Catholic churches some kind of validity in order to avoid the charge that he was creating a brand new church). Insofar as this latter was the case, the Church was “less visible.” In other words, in a sense the visible Church was a manifestation of the invisible Church through the outwad ministry of Word and Sacraments.
*However, *Calvin also taught that the *visible *Church was our Mother and that out of her there was no salvation. What he meant by this was that if you deliberately turn your back on a church where the Word and Sacraments are found, you are separating yourself from the Body of Christ.
For all the ambiguities in this theology, it did give a rationale for the existence of Protestantism while closing the door against schism based on minor matters. It’s easy to scoff at Protestant divisions, but bear in mind that Continental Protestantism has relatively few–the Lutherans and Reformed have given rise to only a few split-off groups over the years, and have maintained a basically solid front (in fact in Germany they have reached a federation). Most of the divisions in Protestantism come from the English-speaking Puritan tradition, which exalted Calvin’s polity and specific theological beliefs above his ecclesiological stress on unity (in all fairness, this happened largely in response to Anglicanism’s “slide” away from the Reformed tradition and back toward Catholicism–the two trends exacerbated each other). Particularly in America, the heirs of the Puritans soon split into an almost infinite number of denominations and independent churches.