This Spanish saying is falsely ascribed to Cervantes in Don Quijote, but it doesn’t appear like that in the novel. This is often used with a sense of criticism against the power of the Church. However, in the passage mentioned below Don Quijote is not talking about the Church as an institution but he refers to the village church (written in lower case), and he doesn’t say “Hemos topado, amigo Sancho” (that literally expresses a negative feeling against the power of the Church), but “Hemos dado, Sancho” (that means “We have arrived at the church, Sancho.”).
Anyway, this false quote has become cliché in Spanish. Sometimes it is used to refer to all sorts of things or institutions that exercise a power that is not easy to face. Nevertheless Spanish people use to say “Con la iglesia hemos topado” without directly talking about the Church, but about something mentioned in the context.