No, there is no direct train service. Depending upon your departure time, there will be either one or two connections. The trip takes around 8 hours. See the timetables at www.bahn.de. Click on the drop-down flag menu for English. After you get summary timetables for Barcelona-Avignon, click on the arrow to the left of each departure time to see the connecting points.
It will be faster to take a direct Eurolines coach (highway bus). The trip takes 6hr30min and booking at www.eurolines.com in advance can get you a fare as low as €38. After you select Spain as your departure country, the site will switch to Spanish.
It will be expensive to rent a car because there is a high fee for picking up a car in one country and dropping it off in another.