I had wondered if the John who died in 1844 was a son, but I couldn't make it work. Yes, he could have been from a previous marriage. I have a copy of the 1803 marriage, but it doesn't state if he was a bachelor.
As for the census you found for Helen Gordon, with Margaret Gordon, that isn't them. The Margaret Gordon, daughter of John/Helen, was married and living with her husband and children.
Thanks for looking at this!
I have looked a little further. It turns out I had the inventory for John Gordon's estate and I now have the will as well. He gave 100 pounds to each of his daughters, but doesn't name them. He lists his youngest son, Robert Green and his oldest son, Robert George. I know of a son named George Gordon, but not a Robert George Gordon. If this is the same John from the 1803 marriage, he had 2 older sons (but they could have died already, as I do not have a record of them in any census).
I also looked at burial records for Edinburgh in the time period of 1818 - 1825 and there were only 4 Gordon burials in the entire parish (there were over 3000 burials in the records). That would tell me that Gordon was not a common name in Edinburgh.
In the 1841 census John Gordon and Elspet lived less than 400 m from Margaret Gordon (daughter of John/Helen) - that's a coincidence too. He was at Janefield House on Easter Rd and she was at the Kirkgate.
I found John/Elspet's daughter, Elizabeth, visiting an Elizabeth Gordon in Moray in 1851 - that Elizabeth loosely fits for the daughter of John/Helen.
I would think that this is either the same man, or it's a son. I'll look at that angle - I hadn't thought of a marriage from before 1803.
Thanks for the ideas!