If I compare the schematics of the two boards the first thing that I see is that the PiFace (schematic) is a much less complicated board then the Gertboard (Schematic on the last pages).
The PiFace is actually an I/O extender that uses the SPI bus to extend the I/O capabilities of the RPi with 8 extra input and 8 extra output pins. While all 8 input and 8 ouput capabilities are routed to pins for external connection, some have a double function. 2 of the 8 output pins are used to drive a couple of Relays, and 4 of the 8 input pins are fitted with buttons on the board itself. Further the input pins are directly connected to the I/O extension IC, there is no protection for over voltage in these circuits. The 8 output pins are driven by a ULN2801A, this means that each output pin can drive up to 500mA (externally supplied) at a maximum of 50V.
In theory you could connect 4 PiFace boards to the RPi, because the address of the SPI I/O extension chip (MCP23S17SP) can be set using 2 jumpers. In reality this will be very hard to achieve because the PiFace is a board that needs to be stacked on top of the RPi and the main connector (the one on the bottom that connects to the GPIO pins on the RPi) is not fitted with a female counter part on the top to enable stacking more boards. I guess they did not do that because the Relays are too high anyway to enable stacking.
Further all the I/O is in a fixed setup, the board is AS IS and you cannot change it in any way.
The Gertboard on the other hand isn't fixed in any way, when you just connect it to the RPi, nothing (??) will work because nothing is actually connected to the GPIO pins. You need to use the scratch pad to manually make the connections to the desired parts of the board. This is done by using wires with a little connector on both ends. The number of options on this board are higher, but you cannot use everything together at the same time (??), so you will have to rewire the scratchpad when a different function is required.
It can also provide extra input and output (Low voltage TTL) pins to use externally, these can be configured for input or output individually, there are 12 of these available and these are buffered (input and output) and the first 3 are fitted with onboard buttons.
It also features 'power' outputs similar to the PiFace board, 6 of these are available, they can also provide a 500mA at a maximum of 50V (externally supplied)
Further is has Analog/Digital conversion, and Digital/Analog conversion, a motor driver that can power brushless motors (servos/stepper motors etc). It even has a separate AVR microcontroller which can be programmed from the RPi to perform separate tasks, independent of the RPi.
Back to your question and the way you wanted it answered, to give a set of general rules the way you asked for is nearly impossible. The only useful thing I can comment in the 'if .. then ..' style is this:
- If you want to experiment with various types of input and output, the Gertboard is the one to go, it features much more options,
- If you need just some extra input and outputs without the hassle of using a scratchpad, the PiFace is the way to go.
You cannot compare both very well, for example I would never use the Gertboard in a product, I could however use the Gertboard for tests and use parts of it in a separate design to be used in a product. The PiFace could be used in a product if you just need some extra input and output contacts.
Within a learning context: The PiFace could be featured in the first lessons to get some basic feeling for input and output and how to handle those from the RPi, the Gertboard could be introduced after that for more advanced tasks.