We're taking advantage of nonstop BA from San Diego to London, transferring to Gatwick from Heathrow. Do we have to go through customs at Heathrow before transferring to the bus to Gatwick? Or do we just do it all in Italy?
You go through passport control (immigration) in London. (Customs is a walkthrough - you probably won't even notice it.) You will also go through security again when you get to Gatwick. Then in Venice you will go through passport control (immigration) and customs.
Move right along as the lines at immigration can be long. How are you getting to Gatwick? If using the National Express coach, you are fortunate as the bus tops are right outside the arrivals area at T5.
Do you know whether or not you have to pick up your luggage at Heathrow or does BA takes care of your luggage for you through Venice?
Since they are changing airports, they will undoubtedly have to pick up bags and recheck them at Gatwick.