It is *possible* to build the O.P's gated window comparator purely with jellybean NPN BJTs and resistors, without compromising on the window thresholds, with enough hysteresis to prevent indeterminate behavior and with reasonable temperature stability, but it certainly wont be cheap (or low power).
Here is a LTspice sim of one possible solution, utilizing long-tailed pair discrete comparators with current mirror tails and hysteresis, and multi-transistor RTL logic to combine the comparator outputs, with a push-pull output stage. As the O.P. didn't specify the acceptable range for the window, I am assuming that thresholds near 1.25V and 3.75V would be acceptable.
I've included a .plt file (rename it without the .txt) to show the output with respect to the two input voltages as they are swept over the range 0V to 5V, to show the hysteresis ranges.
However you'd be crazy to build this instead of the various IC comparator versions that have been proposed.