His father, Rodrigo Pelayo Valladaris, was governor of Coimbra and councillor of Sancho I. It was the wish of his parents that Giles should enter the ecclesiastical state, and the king was very lavish in bestowing ecclesiastical benefices upon him: still a boy, he already held prebends at Braga, Coimbra, Idanha, and Santarem.
Giles, however, wished to become a physician. After devoting some time to the study of philosophy and medicine at Coimbra he set out for Paris,
If we may give credence to his unknown contemporaneous biographer, he was accosted on his journey by a courteous stranger who promised to teach the art of magic at Toledo. As payment, so the legend runs, the stranger required that Giles should make over his soul to the devil and sign the compact with his blood. Giles obeyed and after devoting himself seven years to the study of magic under the direction of Satan, went to Paris, easily obtained the degree of doctor of medicine, and performed many wonderful cures. One night while he was locked up in his library a gigantic knight, armed head to foot, appeared to him and, with his sword drawn, demanded that Giles should change his wicked life. The same spectre appeared a second time, and threatened to kill Giles if he would not reform.
Giles returned to Portugal, where he took the habit of St. Dominic in the newly-erected monastery at Palencia, about 1221. Shortly after, his superiors sent him to the Dominican house at Scallabis, the present Santarem. Here he led a life of prayer and penance, and for seven years his mind was tormented by the thought of the compact which was still in the hands of Satan. Finally, his biographer narrates, the devil was compelled to surrender the compact and place it before the altar of the Blessed Virgin.
Giles returned to Paris to study theology and on his return to Portugal became famous for his piety and learning. He was twice elected provincial of his order in Spain. Benedict XIV ratified his cult on 9 March, 1748.