He was prepared for College at the age of fourteen, but was then on account of his youth put into a business house for four years.
Later, he supplied the Presbytenan Church in Englewood, New Jersey, from the spring of 1862, till February, 1863, during the regular pastor's absence, but a constitutional weakness of the throat induced him to relinquish preaching, after this time.
He was then solicited to open a preparatory school for boys in Englewood, and spent over three years in that employment.
Gray was an honored elder in the Mount Auburn Presbyterian Church, from December, 1871, until his death, except for a brief interval of voluntary retirement; and as the faithful teacher for half that time of a very large class in the Sunday School exercised a great influence over the young.
He published anonymously in 1884 a volume entitled Eight Studies on the Lord's Day, which attracted attention widely as a scholarly and thoughtful defense of the Christian Sabbath.