The bulk photovoltaic effect (BPVE) converts light into a coherent dc current at zero bias, through what is commonly known as the shift current. This current has previously been attributed to the displacement of the electronic wave function center in real space, when the sample is excited by light. We reveal that materials like twisted bilayer graphene (TBG) with a flatband dispersion are uniquely suited to maximize the BPVE because they lead to an enhanced shift in the momentum space, unlike any previously known shift current mechanism. We identify properties of quantum geometry, which go beyond the quantum geometric tensor, and are unrelated to Berry charges, as the physical origin of the large BPVE we observe in TBG. Our calculations show that TBG with a band gap of several meV exhibits a giant BPVE in a range of 0.2-1 THz, which represents the strongest BPVE reported so far at this frequency in a two-dimensional material and partially persists even a room temperature. Our paper provides a design principle for shift current generation, which applies to a broad range of twisted heterostructures with the potential to overcome the so-called "terahertz gap"in THz sensing.