Bite the bullet and fly from Madrid to Porto. That's what I did (after flying in from the US). When planning, I searched in vain to find a convenient train or bus from Madrid to Porto but to no avail. By air it's a quick hop, and in my opinion, well worth it. (Maybe even spend an extra day in Porto and take a trip up the Duoro Valley to see the vineyards where they grow the grapes for Port.)
Then you can catch a Portuguese train up to Barcelos. You'll need to catch the metro to the correct train station (there are two in Porto), I think you need the Porto Campanha station. But it appears there are plenty of trains from there to Barcelos each day. Or, you might even look into catching a cab from the airport to the train station (it would probably save a lot of time). For that matter, you might even look into what a cab would cost from the airport directly to Barcelos.
If you were to take a cab, you might even consider starting your walk in Rates, which is a few kilometers before Barcelos. You could walk a significant part of the Camino between Rates and Barcelos by the time you figured out how to use the Metro (which runs from the airport every half hour, if I remember right, and you'll probably miss one waiting in line at a ticket machine, then trying to figure out how to use it, I did) then get to the train station, then get to Barcelos. It would be much more pleasant walking through the Portuguese countryside from Rates to Barcelos that putzing around with metro and train connections in Porto, and probably not cost all that much more, if any.
Then, there are trains that run directly from Pontevedra to Madrid (at least that's what it looked like on the Renfe website).
These are just my suggestions. You know what would be best for you. But the Portuguese countryside is amazing and the people are wonderful.