According to popular superstition, it is good luck to be hit, usually on the head or shoulders, by a pigeon's intestinal waste. Well, the explanation may have to be found in the election of Pope Fabian in 236.
After the death of Pope Antero, martyred by Emperor Maximin Thracian who had reactivated the persecution of Christians, the Christian community met for the election of his successor. As almost always, the positions were opposed and there was no clear candidate. Fabián, a peasant who was returning from his work in the field, seeing that crowd, approached to smell. At that moment, a pigeon appeared out of nowhere and shit on Fabian. Everyone contemplated that phenomenon – well, it is a phenomenon that with the people who had been involved in the election, it would fall on someone who had nothing to do with it – and they interpreted it as a sign of the Holy Spirit. The divided intervention had chosen the new Pope. Since Fabián was a layman, he was ordained priest, bishop and pope right there.
Therefore, Peter's election and Fabian's were the only two with "divine" intervention. So, this may be the origin of associating pigeon shit with good luck.
Source:Of the human and the divine Illustration:Xurxo Vázquez