Justus A. Gregory was born around 1831 in New York to Edgar and Ellen Gregory. His father was a lumber merchant. The family eventually moved to Cincinnati, Ohio, and by 1850, Gregory was working as a clerk there. He married a woman named Ida, and they had at least three children: Edgar, born around 1859; Ellen, born around 1861; and Elizabeth, born around 1870. They moved to Philadelphia, Pennsylvania, around 1860.
In December 1861, he received a commission as a 2nd lieutenant in Company B of the 91st Pennsylvania Infantry. The regiment took part in the Battle of Fredericksburg, the Battle of Chancellorsville, the Battle of Gettysburg, the Overland Campaign, and the siege of Petersburg. He was wounded at Petersburg on June 18, 1864, and he mustered out on June 26, 1864.
Gregory returned to Philadelphia after leaving the army, and he earned a living as a clerk. By 1870, he owned $250 of personal property. He applied for a federal pension in October 1890 and eventually secured one. He died in Denver, Colorado, on July 18, 1897.