The principle thing: if you have 2k minerals army, he can't have the same army as you AND 20 turrets. So you need to feel the time, when opponent began to mass turrets. In this time he has smaller amount of army. Have chargelots/immortals ready - and break his tanks. in 2-3 minutes he will have similar army, but a little bit lesser amount: repeat your chargelot/immortal push... repeat it few more times... and that's it.
For sure, you will lost somethign. But having more zealots (remember, you opponent began to build mass turrets, so you will have 5-7 "free" zealots) you can do a solid damage not to units, but to SCVs also.
You can force opponent to build MORE turret: show him you warp prism - ... :)
How to feel? Scout! 1-2 observers do that :)
If he began turtling with not turrets - drop him few (4-8 zealots) on the back... at least he will slow down... repeat your drop to his another expansion...
1st thing: keep 1-2 observer on his base. If you detect A LOT of turrets - that mean he has lesser amount of units.
If he ALREADY has turrets AND death ball of tanks...
Actually, you should prevent that. Or at least force him to begin turtling from very his base... (keep some chargelots close to him, but don't waste them for nothing) on the half way will lost his patience and unsiege all tanks: attack in this moment.
Learn your opponent:
If you are playing against "your friend" and with 100% guarantee you know that he will build a solid defense (tanks in siege+turrets): learn his style and counter THAT PARTICULAR STYLE. if he does quick tanks/turrets - you can do very quick expand (with no gateways before nexus) and don't give him to expand: he won't be able to make a turtling death ball from one base. Both of you will have similar losses, but you will have 2 bases.
If he expands quickly - make him warp-prism drop or 4-gate push.