He was born in Berg, Østfold as a son of farmers Olaf Pedersen Ugjesteby and Anette Elise Grasmoen. He finished commerce school at Treider in Kristiania in 1915, and worked in a shop, in a warehouse and with newspaper sales between 1915 and 1926. He was a board member of the trade unionAvis-, bok- og papirfunksjonærers forening, and from 1926 he worked as a secretary in the trade union Union of Employees in Commerce and Offices. He was also active in the International Organisation of Good Templars. From 1923 to 1927 he was a national board member of the Social Democratic Youth League of Norway, and from 1927 to 1929 he was a central board member of the Workers' Youth League. In the Labour Party he was a supervisory council member in the Oslo branch from 1932 to 1968. He was a member of the executive committee of Oslo city council from 1934, and also a deputy representative to the Parliament of Norway during the term 1934–1936. He also advanced to deputy leader of the Union of Employees in Commerce and Offices.
In April 1940, some days after the German invasion of Norway, Gjesteby showed signs of willingness to cooperate economically with the invaders. However, in November 1940, some time into the German occupation of Norway, he was removed by the Nazi authorities as deputy leader of his union. Shortly after, he was arrested because the Labour Party fraction in the executive committee of Oslo city council criticized the Nazification of the County Governor post. He was later released. He found work as office manager in the fish food company Erling Moe, but had to flee the country in 1944. He fled to Sweden where he worked in Svenska Norgeshjälpen until the end of the Second World War. He was a member of the secretariat-in-exile for the Norwegian Confederation of Trade Unions in Stockholm.
Post-war career
After the war he did not return as deputy leader of his union. He did return to the executive committee of Oslo city council, where he remained until 1947. He was a deputy parliamentary representative during the term 1950–1953, and met as a regular representative from November 1953 to January 1954 as a cover for government ministerTrygve Bratteli. He continued working in Erling Moe until 1949. From 1949 to 1950 he worked as a manager in the Norwegian Federation of Co-operative Housing Associations. From 1951 to 1972 he was the manager of the company Gjesteby Manufaktur og Trikotasje. He was a supervisory council member of Oslo Sporveier from 1935 to 1947, the Østfold Line from 1935 to 1940, Oslo Bolig- og Sparelag from 1938 to 1940 and 1944 to 1947. He chaired the board of Oslo- Bolig og Sparelag from 1948 to 1951 as well as Oslo Commerce School. He was the father of Odd Gjesteby, Arne Gjesteby, Anne-Lisbet Gjesteby and Kari Gjesteby. His son Odd was a police investigator during the legal purge in Norway after World War II, which meant that he investigated and interrogated several people involved in the removal of Omar Gjesteby as a unionist. This was criticized by defenders of those who were interrogated, but nothing happened. Gjesteby was decorated with the Medal of St. Hallvard in 1974. He died in October 1979.