Playtesting. Playtesting. More playtesting. And then once you're done with that, some more playtesting.
Any TCG which is complicated enough to be interesting for human players is far too complicated to be able to be modelled mathematically, so extensive playtesting is the only way for the designers of Gwent or any other TCG to be able to design their cards. Of course, just as you as a player can look at a card and have (in most cases) a pretty good clue how good the card is, the designers can do the same and have a good starting point for the cost and abilities of any cards - and the designers are probably better evaluating cards than you, because that's their job.
On the other hand, TCG designers don't always get it right, and sometimes get it really badly wrong. For Gwent (or most other online TCGs), that's not too bad as they can easily tweak the power level of individual cards to ensure none of them are too busted, but that's not an option which is so readily available to paper TCGs because it's harder to change the text on printed cards - the biggest of them all, Magic: the Gathering, has a policy of banning overpowered cards rather than functionally changing them.