Maybe this and this helps.
EDITED:
Using code from links:
And Assuming:Grid where each edge depicts a resistor between its incident nodes (all resistance values are assumed to be 1Ω
gridresistor[p_, q_, ai_, aj_, bi_, bj_] :=
[{A, B, k, c, V}, A = ConstantArray[0, {p*q, p*q}];
Do[k = (i - 1) q + j;
If[{i, j} == {ai, aj}, A[[k, k]] = 1, c = 0;
If[1 <= i + 1 <= p && 1 <= j <= q, c++; A[[k, k + q]] = -1];
If[1 <= i - 1 <= p && 1 <= j <= q, c++; A[[k, k - q]] = -1];
If[1 <= i <= p && 1 <= j + 1 <= q, c++; A[[k, k + 1]] = -1];
If[1 <= i <= p && 1 <= j - 1 <= q, c++; A[[k, k - 1]] = -1];
A[[k, k]] = c], {i, p}, {j, q}];
B = SparseArray[(k = (bi - 1) q + bj) -> 1, p*q];
LinearSolve[A, B][[k]]];
g1 = 7; g2 = 7;(*Grid 7 x 7*)
Ax = 4; Ay = 5;(*Node A*)
Bx = 5; By = 4;(*Node B*)
N[gridresistor[g1, g2, Ax, Ay, Bx, By]]
(*0.660852*)