1605: 3 James 1 c.1: An act for a publick thanksgiving to Almighty God every year on the fifth day of November.
FORASMUCH as Almighty God hath in all ages shewed his power and mercy in the miraculous and gracious deliverance of his church, and in the protection of religious Kings and states; (2) and that no nation of the earth hath been blessed with greater benefits than this kingdom now enjoyeth, having the true and free profession of the gospel under our most gracious sovereign lord King James, the most great, learned and religious King that ever reigned therein, enriched with a most hopeful and plentiful progeny, proceeding out of his royal loins, promising continuance of this happiness and profession to all posterity: (3) the which many malignant and devilish papists, jesuits and seminary priests, much envying and fearing, conspired horribly, when the Kings most excellent majesty, the Queen, the prince, and all the lords spiritual and temporal, and commons, should have been assembled in the upper house of parliament upon the fifth day of November in the year of our Lord one thousand six hundred and five, suddenly to have blown up the said whole house with gun-powder: (4) an invention so inhumane, barbarous and cruel, as the like was never before heard of and was (as same of the principal conspirators thereof confess) purposely devised and concluded to be done in the said house, that where sundry necessary and religious laws for preservation of the church and state were made, which they falsely and slanderously term cruel laws, enacted against them and their religion, both place and persons should be all destroyed and blown up at once; (5) which would have turned to the utter ruin of this whole kingdom, had it not pleased Almighty God, by inspiring the King’s most excellent majesty with a divine spirit, to interpret some dark phrases of a letter shewed to his Majesty, above and beyond all ordinary construction, thereby miraculously discovering this hidden treason not many hours before the appointed time for the execution thereof: (6) therefore the Kings most excellent majesty, the lords spiritual and temporal, and all his Majesty’s faithful and loving subjects, do most justly acknowledge this great and infinite blessing to have proceeded meerly from God his great mercy, and to his most holy name do ascribe all the honour, glory and praise: (7) and to the end this unfeigned thankfulness may never be forgotten, but be had in a perpetual remembrance, that all ages to come may yield praises to his Divine Majesty for the same, and have in memory THIS JOYFUL DAY OF DELIVERANCE;
II. Be it therefore enacted by the King’s most excellent majesty, the lords spiritual and temporal, and the commons, in this present parliament assembled, and by the authority of the same, That all and singular ministers in every cathedral and parish church, or other usual place for common prayer, within this realm of England and the dominions of the same, shall always upon the fifth day of November say morning prayer, and give unto Almighty God thanks for this most happy deliverance: (2) and that all and every person and persons inhabiting within this realm of England and the dominions of the same, shall always upon that day diligently and faithfully resort to the parish church or chapel accustomed, or to some usual church or chapel where the said morning prayer, preaching, or other service of God shall be used, and then and there to abide orderly and soberly during the time of the said prayers, preaching, or other service of God there to be used and ministred.
III. And because all and every person may be put in mind of this duty, and be then better prepared to the said holy service, be it enacted by authority aforesaid, That every minister shall give warning to his parishioners publickly in the church at morning prayer, the Sunday before every such fifth day of November, for the due observation of the said day; and that after morning prayer or preaching upon the said fifth day of November, they read publickly, distinctly and plainly this present act.
Source: Pickering Statutes At Large, vol. 7.
Further reading: Wikipedia.