It’s an accurate statement for a couple of reasons:
During WW1, Germany’s 1915 “unrestricted” submarine campaign failed to significantly impact Britain largely because Germany only possessed a few dozen U-boats capable of Atlantic operations. This had changed by 1917 when Germany launched another unrestricted campaign. By this time, the Kaiserliche Marine had about 100 U-boats. Consequently, the first half of 1917 was the closest in either war that Britain came to total defeat.
This was not the case in WW1, however. Sonar and radar were not yet in service. Depth charges did not appear until 1916 and, without sonar, they were of somewhat limited use anyway. Allies aircraft also lacked both the quantity and quality compared to the following war. A submerged U-boat during WW1 was therefore both invisible and nearly impervious to attack. Moreover, anti-submarine doctrine and experience was also far less mature than in WW2. The Allies ultimately avoided catastrophe in 1917-1918 by implementing a convoy system, but they never really tactically defeated the U-boat during that war.
tl;dr the 1917 U-boat campaign came closer to defeating Britain than any point during WW2 because Germany had a large U-boat fleet to employ and the Allies lacked the technology to defeat them on a tactical level.