This is a modification of the old (?) saying: No pain, No gain, which means "any significant improvement will involve a significant risk or cost."
The most common setting for this saying is exercise: If you're not getting tired and uncomfortable (especially 'feeling the burn' of heavily-worked muscles), you're not putting in enough effort to improve.
Here the author is implying that in order to achieve his ultimate goal (the "gain", presumably from eventually being right about taking the short position), he had to put up with the costs along the way (the "pain" of watching them go up in value, which you don't want when you take a short position, especially if they go high enough that you have to come up with additional funds to cover a margin call).
To re-word it, I might say "I had to maintain my short position and manage all the short-term costs, no matter what." (Because I was certain that the eventual payoff would more than make up for those costs.)