We have done that transfer in the other direction ( Heathrow to Gatwick) on our way to Venice in 2003. We had four hours and it was fine. We had carry-on luggage only and were traveling in Business Class so could Fast Track through immigration and security. We took the coach service from T2 to Gatwick.
But I would not count on it going that smoothly, and I haven't booked a BA flight with an airport transfer since.
Chances are good that it would go well but you should understand the steps involved and move right along. I would pay to choose a seat on the long-haul flight and get one as far forward in the aircraft as possible to speed up de-boarding. Use the eGates for immigration; customs is just a walk-through and takes no time.
Then have a plan for the transfer. Understand the options and have a backup plan in case of severe traffic on the motorways between the airports. And be ready to go through security with laptop, phone, and/or tablet out of your bag into a tray. And be sure your 3-1-1 bag of liquids is compliant and ready to pull out of you bag as well ( or put it in checked luggage if you have it). A mistake here can cost you 15-20 minutes (it happened to me).
And if for some reason you don't make it in time, do not fret. Since this is booked as one ticket, BA will put you on the next possible flight to Berlin.