Source: 1860 US immigration record, where she is known as "Peggy" McVickar, when she arrives with William Gray, plus 1870, 1880, 1900 and 1910 censuses, where she is known as Margaret Gray.
Surprisingly, there is a marriage record (Charles Street United Presbyterian Church, New York) for Margaret McVickar and William Gray in the IGI, taken from Civil Records, which records her marriage in 17th Feb 1870, yes, 1870 = after William already had three children. There are three possible explanations: William married twice and the first three children were not Margaret's in the 1870 census; William and Margaret didn't marry til after they already had three children; or a combination of the above. Perhaps William had two children to a previous wife and Margaret was born before he married Peggy McVickar, which would help explain the naming of Margaret.
From A.com via BB:
1890 City Directory - NYC - [Census substitute]
Gray Margaret, wid. William, h 204 Eighth av.
In the 1900 census she is widowed, aged 62, born in May 1838, born in Ireland, immigrating in 1855 and in the US for 45 years (both figures incorrect), with 5 children, only two of whom are still alive. She gives two "daughters" as living with her: Mary E, 34/35 and single and Sadie, 27/28 and single. This makes no sense at all as only Sadie was born after Margaret married in 1870, whereas Mary was born before young Margaret who is very much still alive, as is their brother, James. If Mary is a daughter of Margaret, then so should young Margaret be, which makes at least three children still alive. There was clearly some doubt at the time as the figure "two" is actually a "one" amended. A "cousin" called Belle, born in August 1867 in New York, is also living with her. Again there is something wrong here. This is in all probability her niece, Isabella Gray, daughter of Samuel Gray. Also, living as a lodger with her is one Charles Meriit, "merchant". The following year, Charles married Margaret's daughter, Sadie.
By 1910, Margaret Gray, aged 75, widowed, from Ireland and living in the United States from 1860, is living as the mother-in-law of Charles Merritt and his wife Sarah, aged 39. By now she has only 2 children, both still living. This would fit with the current theory that she may have been the second wife of William Gray. Even though she arrived in the States with William in 1860, it now appears that he had his first child, James, to a Jane Carson, and he did not marry Margaret til 1870.