The Popes were in Avignon from 1309 to 1377.
In short, the influence of the French government resulted in the movement of the papal headquarters from Rome to Avignon. A clash between Pope Boniface VIII (r. 1294 -1303) and “Philip the Fair” of France (King Philip IV, r. 1295-1314) set in motion the events that would lead to the relocation, which took place during the pontificate of the French Pope Clement V (r. 1305-14). Clement V acceded to Philip IV’s demand to move the papal residence to Avignon.
St. Catherine of Siena was instrumental in ending the Avignon papacy. For more on this period in the Church, see this article by Steve Weidenkopf.