I made a cheap and sturdy tailgate table that works with my Smittybilt tailgate cover.
It's simply a piece of 12mm marine ply, two wooden brackets, two chest hinges, two tool hooks, two rubber door stoppers and some grippy rubber mat.
If you want a lower table, swap the hooks and stoppers around.
If you want a "splashback" or extra support, attach another panel with a hook and stopper so it folds flat between and underneath the legs by spacing the legs' hinges upwards with two strips of plywood.