In the example that you posted (the "Little Fugue"), what you have is the rhythm getting a half-bar "out of phase" with itself. This is something you actually see quite frequently in classical music (or at least Baroque music) that's written in common meter (4/4). It's by no means unique to fugues. I'm not sure I've ever heard anyone directly discuss the technique, but I've seen it quite often. If there's a more specific name, I'd love to know what it's called.
Essentially, what happens is that, in common meter, beats one and three are heavily accented, while beats two and four are lightly accented. In theory, one is supposed to be more heavily accented than three, but what happens in practice, at least in some pieces, is that they get roughly equally accented. If you wanted to, you could analyze the piece in 2/4 instead of 4/4. I think of these two-beat units as "half-bars" (I'm not sure this is a proper music theory term). In order to strengthen this effect, you need to use a melodic figure that only lasts a half bar, and you need to change harmony at least that frequently.
What happens then, is that you have a phrase of music that takes up an odd number of half-bars, and from that point on, all the music becomes out of sync with the barlines. In your example, (using the youtube video that I edited into your question) this occurs after the first two voices have entered. There's a 3 half-bar sequence, ending with the dominant D chord in the first half of the measure (indicated by the F♯ and D in the alto voice), which sets up nicely for the return of the tonic (Gm) on beat 3, where the enters.
Nevertheless, with fugues, voices often overlap, so while the alto voice is cadencing in the middle of that bar (where the tenor voice is entering), the soprano voice doesn't reach its cadence until half a bar later (at the next bar line), at which point the alto voice is re-entering.
EDIT: To demonstrate that this "out of sync with the barlines" rhythm is not a technique unique to fugues or to Bach, I just searched youtube for Vivaldi violin concerti with scores, and the first result I came across (an A minor violin concerto) has a great example. Fortunately, the bars are numbered so I can refer to them (note, the video only contains the violin solo part). The main motive for this piece is a repeating series of four (actually five) eighth-notes, which you hear in the first half of the opening measure (after the pick-up beat). However, in the third through sixth measures, this motive has already been shifted to the second half of the measure (fun exercise: Try chopping out the second half of the first bar, and see what you think).
But in case that's not enough for you, when the main theme is restated later, in measure 35, it enters in the middle of the measure, so the entire thing is shifted.