From London to Barcelona takes around 24 hours by train on the standard cross-Channel route, though using the Eurostar service through the Channel tunnel (which runs from London to Paris in 3hr) can shave up to six hours off this. However, using Eurostar to kickstart your rail trip to Spain is expensive - you will almost certainly be able to fly all the way there for less.
Most regular train departures are from Victoria or Charing Cross stations, daily at between 9 and 11am, changing trains in Paris in the early evening (you have to change stations in Paris, too - from Nord to Austerlitz; take metro line 5, direction Place d'Italie). From there, there are two routes to Barcelona, and on either you'll be changing trains again at the French/Spanish border early the next morning