At this time of year there are flights to 23:00 hrs out of LGW on some days, so I suspect you could probably check in the bags to 22:00 hrs or even a little beyond. However on some days there aren't any flights after 21:30 so there is a risk there won't be any BA staff in check-in after 21:00 hrs. The way to find out is to check the last EDI, GLA or BCN flight since they are usually the last 3 services out of LGW on normal days. And then knock an hour off the departure time.