My plane lands at Heathrow at 8:30 pm on December 10 and leaves Gatwick the next morning, December 11, at 9:15 am. Do I have the time to see Buckingham Palace?
As you've got to make the journey between airports anyway, I say make the most of it. Sleep on the plane if you can and see the city at night. I'd pack in one backpack (hand luggage strapped on top) and do it on foot, but taxi/bus/night tube (Friday and Saturday) are other options.
The last tube train from Heathrow is at 23:35 (T4) or 23:42 (T5), a few minutes later for T123. So you should have plenty of time to clear immigration, retrieve your luggage and get the tube. There's also the TFL line train but that goes to Paddington station which is 3 km from Buckingham Palace). You can check for planned/emergency issues online at Transport for London's website.
If you get the tube, you can go to Hyde Park Corner, less than 1 km away from the Palace.
In the morning I used to quite often get an early train out of London Bridge to Gatwick. Currently that looks to be 05:35, getting in at 06:04. That should be plenty early enough for most flights but you'd need to check.
Assuming you're happy to walk through the night you can see a lot of London Here's a quick 10 km route suggestion I threw together. It takes in Buckingham Palace, Parliament Square (but not Big Ben/Elizabeth Tower which is being repaired), the Embankment, Trafalgar Square, Covent Garden, the Strand (you could night-bus this bit), St Paul's Cathedral, the Tower of London and Tower Bridge.
Night buses from Trafalgar square will get you to many places but they're not very frequent. I've deliberately omitted airport buses in the interest of maximising your time in London. The tube and regional trains aren't all that expensive, and are much quicker; they're also less much affected by traffic, though there are rare delays in the middle of the night.
Yes, it's doable. Although going through central London isn't the fastest route from Heathrow to Gatwick, you have lots of time so it's not an unreasonable route to take.
You could obviously do it all by taxi, but it's also possible (and much cheaper) on public transport. You can get the underground from Heathrow to Green Park, which will take about 50 min, and then you're only a few minutes walk across the park to the palace. You can then walk to Victoria station, and get a train to Gatwick. The last train to Gatwick is at 00:08 (though trains from other stations and coaches run through the night, and the ones from Victoria start pretty early in the morning).
Yes, with Caveats. Budget for contingency - 2 hours on landing, maybe 3 for T5. I'm not kidding about T5 at this time of year. A morning arrival might have been better, it will be dark.
So everything else is down to visibility, you will miss peak hours. Suggest you get a driver both ways, or tube and cab. Buses do not pass the Palace. You are taking your chances with visibility as well. Plan to be back at the Airport at 06:00, again, for contingency.
Risks: Snow, Tube Outage, Rain, Freezing Rain, Sleet, Traffic, Holiday events (Winter Wonderland is close by).
Per other responses, the short answer is "yes you do" but you're only going to see the outside of it.
A brief stroll back up the mall will land you at Nelson's Column, and you're near enough some night-life such as Leicester Square, or the theatres on the embankment, as well as within wandering distance (or a short tube ride) of the illuminations in Carnaby Street (Bohemian Rhapsody this year!) and there's doubtless a few others to see too.
I don't know the opening times but over the river you've got the London Eye which could provide a decent photo op too. Just a shame Big Ben is scaffolded up for repairs for the forseeable.
It takes 45 minutes to get out of the airport and another hour to get from Heathrow to BP. You'll arrive at BP at 10.15pm. Not much to see at there at that time, so I think you'd do better to head over to Waterloo Bridge and then wander up in to Covent Garden, Leicester Square, Picaddilly Circus, and Soho. The cheapest way to get to Gatwick is by coach from Victoria Coach Station. It's a miserable trip, early in the morning, but it sure is cheap.