https://en.wikipedia.org/wiki/Bell,_book,_and_candleThe phrase "bell, book, and candle" refers to a Latin Christian method of excommunication by anathema, imposed on a person who had committed an exceptionally grievous sin. Evidently introduced by Pope Zachary around the middle of the 8th century, the rite was once used by the Roman Catholic Church.
The ceremony was described in the Pontificale Romanum until the time of the Second Vatican Council. Subsequent post-conciliar editions of the Pontificale omitted mention of any particular solemnities associated with excommunication.
The ceremony traditionally involved a bishop, with 12 priests bearing candles, and would solemnly be pronounced in some suitably conspicuous place. The bishop would then pronounce the formula of the anathema, which ends with the following words:
Wherefore in the name of God the All-powerful, Father, Son, and Holy Ghost, of the Blessed Peter, Prince of the Apostles, and of all the saints, in virtue of the power which has been given us of binding and loosing in Heaven and on earth, we deprive him and all his accomplices and all his abettors of the Communion of the Body and Blood of Our Lord, we separate him from the society of all Christians, we exclude him from the bosom of our Holy Mother the Church in Heaven and on earth, we declare him excommunicated and anathematized and we judge him condemned to eternal fire with Satan and his angels and all the reprobate, so long as he will not burst the fetters of the demon, do penance and satisfy the Church; we deliver him to Satan to mortify his body, that his soul may be saved on the day of judgment.
After this recitation the priests would respond: Fiat, fiat, fiat ("So be it! So be it! So be it!") The bishop would then ring a bell, close a holy book, and he and the assisting priests would snuff out their candles by dashing them to the ground.
During Wojtyla's funeral, the wind closed the book and extinguished the candles ... and I'm sure it caused some bells to ring as well (though that part I couldn't hear on the video of the funeral).
Being familiar with this ceremony, these events at Wojtyla's funeral gave me chills.