You can find a criterion for invertibility in the following question
A practical way to check if a matrix is positive-definite
You also might find Theorem 1.21 in Varga's Matrix Analysis helpful.
This theorem says that a matrix $(m_{ij})$ satisfying the conditions in your question and one extra condition is positive definite (and thus invertible). This extra condition should be that your matrix is "irreducible". (As you see, this is not satisfied bz Davide's example. In fact, there is no path from 1 to 3.)
See also Corollary 1 in the following notes I found googling the subject:
http://www.cs.zju.edu.cn/people/zhzhang/papers/note12.pdf
So the moral of the story is that you should consider one extra condition to get invertibility and this condition is "irreducibility". It basically means that the graph associated to your matrix is connected.
Let me know if anything is unclear. I wrote this in a bit of a hurry.
(Let me add that such matrices arise in intersection theory. In this case, the matrices are irreducible by Zariski's main theorem.)