The longest I have ever queued in Gatwick immigration has been about 55 minutes, and that was behind a hideously huge mass of people. They really seem to shift people through (or not!) efficiently.
I'd say three hours for departing the plane, going through immigration, picking up your luggage and finding your next gate is sufficient for Gatwick.