Gilman was born in Exeter, New Hampshire, on August 3, 1755. He was the second son of eight children; his older brother was John Taylor Gilman, a future Governor of New Hampshire. After attending local schools, he worked as a clerk in his father’s countinghouse.  
In November 1776 Gilman was appointed adjutant of the Third New Hampshire Regiment. In this position, he played a critical role in rebuilding the regiment. In the spring of 1777, the 3d New Hampshire engaged the British army under the command of General John Burgoyne at Fort Ticonderoga. Burgoyne's forces were victorious, and the defending garrison was forced to retreat. Later that summer, Gilman's unit participated in two battles at Freeman's Farm, beating the British so soundly that Burgoyne was forced to surrender his entire army. Gilman's administrative skills eventually earned him a position as Colonel Scammell's assistant and a promotion to Captain when the Colonel was promoted to Adjutant General of the Continental Army. 
Continental Congress and Constitutional Convention
Gilman served as a member of the Continental Congress from 1787-1789; during this time, he represented his state at the Constitutional Convention. Though he arrived late to the proceedings, he played an active role in helping to shape the document. 
Later Political Service
Gilman served as a member of the House of Representatives in the First Congress, and remained in that position through the Second, Third, and Fourth Congresses. During this time, he wielded considerable influence, serving as the chairman of the Committee on Revisal and Unfinished Business during the Fourth Cogress. Gradually, his loyalties shifted due to his concerns over growing government power; as a result, he threw his support behind Thomas Jefferson's Democratic Republican Party. In 1804, Gilman was elected to the United States Senate as a Democratic Republican, and remained in the Senate for the remainder of his life.
Gilman died in Philadelphia, Pennsylvania, on May 2, 1814; he was buried in Exeter Cemetery in Exeter, New Hampshire.