It backs up upstream on the barrier. the barrier is only closed when the net flow (Incoming tide + river outflow) is inland (toward London). When the tide falls, the barrier drops, allowing the backed up water to flow out into the estuary
By raising I assume that is the closed position. I would think it would build up behind the barrier with the intent to let it flow through at a reduced and manageable rate.
The barrier is intended to stop water from high tides running UP the river and flooding London, so will only be raised for the duration of the tide. Perhaps the amount of water flowing DOWN the Thames for this period is not sufficient to cause problems.