He attended the public schools and was graduated from West Virginia University Law School at Morgantown in 1901.
In 1901 Ramsay was admitted to the bar and commenced practice in New Cumberland. Then in 1905 he moved to Wellsburg, Brooke County, West Virginia and continued the practice of law. In 1905 he became the city attorney of Follansbee, Brooke County, West Virginia, serving until 1920.
Ramsay served as two terms as prosecuting attorney of Brooke County, 1908–1912 and 1916-1920.
Robert Ramsay was elected from West Virginia"s 1st District as a Democrat to the Seventy-third, Seventy-fourth, and Seventy-fifth Congresses, serving from March 4, 1933 until January 3, 1939. The 1938 elections proved to be unsuccessful for Ramsay, as he was defeated by A. C. Schiffler for reelection to the Seventy-sixth Congress.
He resumed the practice of law in Wellsburg, West Virginia. He was re-elected to the Seventy-seventh Congress, serving from January 3, 1941 until January 3, 1943.
Poor results followed Ramsay into the 1942 elections, as he was once again defeated for re-election by A. C. Schiffler to the Seventy-eighth Congress.
Ramsay served as a special assistant to the United States Attorney General from 1943 to 1945. Then he served as assistant attorney general of West Virginia 1945-1948. Ramsay was re-elected to the Eighty-first and Eighty-second Congresses, serving from January 3, 1949 until January 3, 1953.
He was an unsuccessful candidate for renomination in 1952 and then resumed the practice of law and was assistant prosecuting attorney 1952-1956.
Robert L. Ramsay died in Wheeling, West Virginia, November 14, 1956 and was interred in Oak Grove Cemetery, Follansbee, West Virginia.
Ramsay became a member of the board of governors for West Virginia University from 1927 until 1930.