A reply to /u/FineFuse
Rather than directly answer this very complex question, I would like to challenge the scoping of your question as follows.
The Catholic Church in the middle ages, which by the way spans a huuuuuuuuuuuge timeline and covers a huuuuuuuuuuge area, was not a monolithic, opaque being. The theoretical subservience to the Pope in Rome was in reality a highly fragmented political landscape. Positions of clergy, bishoprics, control of monasteries, cathedrals, churches, and perhaps most importantly revenue, were contested by regional powers and the cardinals and the Pope himself. At that time, there was no separation of church and state, so in many instances, the archbishops were the rulers. Further, many clergy positions were controlled by local rulers, as they made perfect vehicles for entitlement of their younger sons and daughters and bastard children.
So when you ask whether heresy was a serious threat to the Catholic Church, then the answers is yes, any deviation of orthodoxy was a serious threat to some aspects of the Catholic Church, especially the local power structures.
More broadly speaking, some heretical movements such as the Cathars were able to grow into strong regional secession movements, both against the church and against local rule -- remember, there was no separation of church and state. Thus, they were a grave threat to the Catholic Church in the regions that they fomented rebellion, and if they were to spread then it will have been a wider threat. That's why the Albigensian Crusade was called to stop this movement. Catharism spread across trading routes of the northwestern Mediterranean and was naturally seen as a grave threat to Rome itself.