Last year I was arriving at LGW around 1am and had a flight in the morning to Bologna (T3 at the time) so I booked in the DoubleTree as it’s only a short bus ride and the HGI at T2 was demanding crazy money and I think Hatton Cross was full. This was all booked short notice.
Arriving into LGW tired, all I wanted to do was sleep and the ride felt like it was taking forever because of that. Surprisingly despite the time the doubletree was happy to give me a complimentary drink!
As my flight was in the morning (well it was supposed to be, but it was cancelled) I would still get to LHR asap but as yours is in the afternoon I think I’d rather sleep in Gatwick and aim to get to Heathrow about 3 hours before your flight to allow for any traffic issues.
I’d choose the Hilton at Gatwick as I’m so close to lifetime diamond status and for those arriving earlier in the day I recommend this hotel if you have status. But with such a late arrival you really don’t lose anything by going for a budget option.
If you’re not arriving BA (always south terminal) it’s worth knowing that the Sofitel is north terminal and Hilton is south. There’s also a Hampton by the north terminal and a few Premier Inns around the airport.