David Gokhberg was born in 1924 in the town of Khmelnik (near Vinnitsa, Ukraine). He had two siblings: an older sister and a twin brother named Isaak. David attended a ten-year Yiddish school in Khmelnik, which was transformed into a Ukrainian one in the late 1930s, after David had finished the 8th grade. During the "Great Purge" of 1936–1938, some members of the local intelligentsia in Khmelnik were arrested, including David’s Yiddish teacher, Max Zhuk. A little later, David's elder sister married and moved to the city of Białystok, which became part of Belarus in the aftermath of the Molotov-Ribbentrop Pact and the Soviet annexation of Eastern Poland in September 1939.
Following the outbreak of the Soviet-German War, the sister and her family managed to leave Białystok, and finally arrived in the Soviet interior. As for David, who was seventeen at the time, he was evacuated from Khmelnik, together with his twin brother and their neighbors. Their parents decided to stay in the town, hoping that their daughter would come back to them. The evacuees arrived in Voronezh, and then traveled on to Ashkhabad (Turkmenistan). David and Isaak found work in that city. However, they soon heard the news of the extermination of the Jews of Khmelnik (David would later learn that his parents, together with most of the town's Jews, were shot by the Germans and their local collaborators on January 9, 1942). The brothers then decided to enlist in the army. As both of them were still below the age of eighteen, they were sent to a rifle school. However, in mid-1942, before he could finish his studies, David was sent to the front line as a private. His brother completed his training at the school, and later served in the war as a lieutenant and commander of a rifle platoon. David was sent to Stalingrad, but arrived too late to take part in the battle. After a circuitous journey, he arrived in Kursk, where he participated in the Battle of Kursk in the summer of 1943. There, he was seriously wounded and sent to a field hospital. Because of the influx of wounded soldiers, he had to wait for a while, until the surgeons could operate on him. David would later recall that a major of the medical service, who was a Jew, asked him: “Who are you?” – “I am a Jew,” answered David. Immediately, the Jewish doctor sent him to the operating room. Thanks to the prompt surgical intervention, David managed to avoid a foot amputation. After a five-month-long convalescence at a hospital, David was discharged from the army. He learned the location where his sister had been evacuated, and traveled there to be reunited with her. Sometime later, the two of them received notification of the death of their brother Isaak, who had been killed in action near Kharkov.
After the end of the war, David Gokhberg worked as an accountant in Riga. In 1990, he immigrated from the Soviet Union to Israel, where he took an active part in the work of the Union of Veterans of World War II.