By S21 I assume you mean the gain of a reference horn antenna. Gain measurementrs are made by comparison with known gain antennas. The ratio of the power received with your antenna, to the power received by the reference gain antenna is the ratio of the gains. Make sure that the two horns are in the same place, facing the same way and that there are not bounces off walls floor or ceiling, or anything else, that will enter the two horns differently and make the comparison invalid. Gain changes with direction. A reference gain antenna will have a known peak gain, usually directly ahead (boresight).
It is possible to calculate gain using distances and knowing all the losses involved, and measuring powers accurately, but there is a lot of room for errors in that.