You will not go through passport control or customs at LHR, and you will not have to collect your checked bag if you have one since BA will check it through to BCN even if your two sectors are on different tickets. Just follow the flight connections signs on arriving at T3. You will go through security but after that you will be in the airside departures stream and ready for your flight to BCN.
You will go through immigration and customs at BCN.