In his seminal work, The Great War and Modern Memory, Paul Fussell explains the meaning of this toast:
Every day still the Times and the Telegraph print the little "In Memoriam" notices – "Sadly missed," " Always in our thoughts," "Never forgotten," "We do miss you so, Bunny" – the military ones dignified by separation from the civilian. There are more on July 1 than on other days , and on that date there is always a traditional one:
9th And 10th BNS., K.O.Y.L.I.–To the undying memory of the Officers and Men of the above Battalions who fell in the attack on Fricourt (Somme) on July 1, 1916.
"Gentlemen, when the barrage lifts."
B. H. Liddell Hart, who was in the 8th Battalion of the King's Own Yorkshire Light Infantry, explains. Just before the Somme attack,
the officers assembled in the headquarters mess, in a typical Picardy farmhouse. Recent strain between the commanding officer and some of the others led to an embarrassing pause when the senior company commander was called on to propose a toast to the C.O. On a sudden inspiration, he raised his glass and gave the toast with the words: "Gentlemen, when the barrage lifts."
The battalion attacked With some 800 men. Twenty-four hours later its strength was 80 men and four officers. And because of the annihilation of the Ulster Division on the same date, "1 July," as Brian Gardner notes, "is still a day of deep mourning in Ulster." In remote, self-contained towns like "Akenfield" it is Armistice Day that draws every one to church. By contrast, says, Ronald Blythe, "Good Friday is barely observed at all, everybody playing football then." (The Great War and Modern Memory, 315-316)
For more about the Ulster Division, see Frank McGuinness' Observe the Sons of Ulster Marching Toward the Somme (1986).