The Pope is not infallible.  The Church - being created by the Holy Spirit - has a chrism of infallibility, and the Pope can officially declare doctrines that are infallibly true.  He has only done so three times, and then only because there was some question about those doctrines.

Many of the Church's most basic dogmas have never been DECLARED infallible, but they clearly are, like the efficacy of baptism, the Real Presence or the 27-book New Testament.  If they ever become controversial within the Catholic Church, THEN the Pope might declare them infallibly true.