First, concerning そうね, we have two possible interpretations. One is that it shows your agreement to the opponent. The other is that you are thinking about something and almost have found it right.
As for がんばるね, it's a bit difficult to explain but you can think of it as a kind of greeting in wrapping up the conversation.
If ね is used in a certain situation, it indicates that both the speaker and the listener share context and information about what is said. For example, if you say おいしいね to someone, it indicates that both you and s/he are involved in a context that tells something is delicious and you believe there's no room for both of you and him/her to doubt it. (Even if it's not the case, ね functions as a rhetoric to forcibly make the opponent affirm it.)
When people wrap up a conversation, it's often accompanied with some sign that shows something is confirmed between speakers. That's probably why you see this kind of use of ね.