Gunn was born in Virginia to John and Mary Gunn. After being educated to the law, he moved and began the practice of law in Savannah, Georgia. Gunn served in militia dragoon units during the Revolutionary War, and eventually rose to Brigadier General in the Georgia Militia.
Gunn was selected as a delegate to the Continental Congress in 1787, but never attended sessions. He was elected a United States Senator and served from 1789 until 1801. Gunn died in Louisville, Georgia.
A World War Liberty Ship, the SS James Gunn, ATS-0044 was named for him.