i think you can rule this William out,,,i can see a William Gibson of the 42nd collecting his pension in Glasgow right up to 1875. And he started collecting it in 1859,,,so is probably this William.
I cant see any other service records for a William Gibson b c 1820 serving in the regiments i mentioned above.