スポーツ以外でも使います。「踏ん張る」の本来の意味は、firmly hold your ground or keep your feet on the floor firmly です。つまり、hang in there とか come through the hard time みたいな意味になります。
「がんばれ」は、相手がいい状態でも悪い状態でも応援するときに使います(to cheer up someone in both situations good and bad)。「ふんばれ」はどちらかと言うと、相手が劣勢(in trouble or hard time)にあるときに使います。