You had to be wealthy to a degree, but not necessarily exhorbitantly so, and certainly not to the point that your every need was taken care of from birth. What you really needed was to come from a family wealthy enough to afford an education. This is true whether we are talking about the 13th century or the 16th century. Look at the similar backgrounds of Copernicus and Newton, seperated by almost three centuries. Their first key to success was coming from wealthy familes. Not necessarily rich, but enough money and/or contacts to get the child into a good education and eventually university. Remember that, until the 20th century, University was a relatively closed off institution and post-secondary graduates were uncommon indeed. Knowledge of Latin, Math, and very often law, meant that these men formed the backbone of many bureaucracies in states across Europe. For most of the medieval and early modern period then, their continued 'wealth' or comfort most often relied on one of three things:
Placement at a university, often funded by local religious institutions and the Catholic Church, sometimes placing them directly into the church heirarchy. Later on individual monarchs founded and funded more secular oriented Universities, or appropriated existing schools from Vatican control.
Placement at court, as an adviser, translator, secretary, or other duty where knowledge of math, philosophy, and law would have been a huge advantage
Direct patronage by a rich lord or lady, often on a commission basis.
The first one describes Newton, who studied and taught at Cambridge, while the second adequately describes Copernicus. The last one might adequately describe Michelangelo or Archimedes, whose funds primarily came from projects, but the payment of which gave them the freedom to explore for themselves.