What was Saint Thomas Aquinas's girding by the two angels? Diego Velázquez's Temptation of St. Thomas shows him being girded by angels with a belt of purity:



What is the event behind this painting?
St. Thomas Aquinas's mother, a countess, tried to dissuade him from entering the Dominican Order because she hoped St. Thomas would become a prominent political figure. His brothers locked him up in a tower for a whole year and tempted him with a prostitute, whom he struck and chased out with a fiery brand. Two angels then girded him as a sign that God will always protect his purity.

Here's how Fr. Alban Butler recounts the story, from his The Lives of the Saints, "St. Thomas Aquinas":


  …the saint, not listening to flesh and blood in the call of heaven, demanded with earnestness to be admitted into the Order, and accordingly received the habit in the convent of Naples, in 1243, being then seventeen years old. The Countess Theodora his mother, being informed of it, set out for Naples to disengage him, if possible, from that state of life. Her son, on the first news of her journey, begged his superiors to remove him, as they did first to the convent of St. Sabina in Rome, and soon after to Paris, out of the reach of his relations. Two of his brothers, Landulph and Reynolds, commanders in the emperor’s army in Tuscany, by her directions so well guarded all the roads that he fell into their hands, near Acqua-pendente. They endeavoured to pull off his habit, but he resisted them so violently that they conducted him in it to the seat of his parents, called Rocca-Secca. The mother overjoyed at their success, made no doubt of overcoming her son’s resolution. She endeavoured to persuade him that to embrace such an Order, against his parents’ advice, could not be the call of heaven; adding all manner of reasons, fond caresses, entreaties, and tears. Nature made her eloquent and pathetic. He appeared sensible of her affliction, but his constancy was not to be shaken. His answers were modest and respectful, but firm in showing his resolution to be the call of God, and ought consequently to take place of all other views whatsoever, even of his service any other way. At last, offended at his unexpected resistance, she expressed her displeasure in very choleric words, and ordered him to be more closely confined and guarded, and that no one should see him but his two sisters. The reiterated solicitations of the young ladies were a long and violent assault. They omitted nothing that flesh and blood could inspire on such an occasion, and represented to him the danger of causing the death of his mother by grief. He on the contrary spoke to them in so moving a manner, on the contempt of the world, and the love of virtue, that they both yielded to the force of his reasons, for his quitting the world, and by his persuasion, devoted themselves to a sincere practice of piety.
  
  This solitude furnished him with the most happy opportunity for holy contemplation and assiduous prayer. Some time after, his sisters conveyed to him some books, viz., a bible, Aristotle’s Logics, and the works of the Master of the Sentences. During this interval his two brothers, Landulph and Reynold, returning home from the army, found their mother in the greatest affliction, and the young novice triumphant in his resolution. They would needs undertake to overcome him, and began their assault by shutting him up in a tower of the castle. They tore in pieces his habit on his back, and after bitter reproaches and dreadful threats they left him, hoping his confinement, and the mortifications every one strove to give him, would shake his resolution. This not succeeding, the devil suggested to these two young officers a new artifice for diverting him from pursuing his vocation. They secretly introduced one of the most beautiful and most insinuating young strumpets of the country into his chamber, promising her a considerable reward in case she could draw him into sin. She employed all the arms of Satan to succeed in so detestable a design. The saint, alarmed and affrighted at the danger, profoundly humbled himself, and cried out to God most earnestly for his protection; then snatching up a firebrand struck her with it, and drove her out of his chamber. After this victory, not moved with pride, but blushing with confusion for having been so basely assaulted, he fell on his knees and thanked God for his merciful preservation, consecrated to him anew his chastity, and redoubled his prayers, and the earnest cry of his heart with sighs and tears, to obtain the grace of being always faithful to his promises. Then falling into a slumber, as the most ancient historians of his life relate, he was visited by two angels, who seemed to gird him round the waist with a cord so tight that it awoke him, and made him cry out. His guards ran in, but he kept his secret to himself. It was only a little before his death that he disclosed this incident to F. Reynold, his confessor, adding that he had received this favour about thirty years before, from which time he had never been annoyed with temptations of the flesh; yet he constantly used the utmost caution and watchfulness against that enemy, and he would otherwise have deserved to forfeit that grace. …


The prostitute is shown in the background of Velázquez's painting. Bernardo Daddi's The Temptation of St. Thomas Aquinas shows her more prominently, and she lacks a halo:



cf. also the Angelic Warfare Confraternity