Let R be an arbitrary ring and C a complex with finite Gorenstein projective dimension (that is, the supremum of Gorenstein projective dimension of all R-modules in C is finite). For each complex D, we define the nth relative cohomology group ExtGPn(C,D) by the equality ExtGPn(C,D)=HnHom(G,D), where G⟶C is a strict Gorenstein projective precover of C. If D is a complex with finite Gorenstein injective dimension (that is, the supremum of Gorenstein injective dimension of all R-modules in D is finite), then one can use a dual argument to define a notion of relative cohomology group ExtGIn(C,D). We show that if C is a complex with finite Gorenstein projective dimension and D a complex with finite Gorenstein injective dimension, then for each n∈Z there exists an isomorphism ExtGPn(C,D)≅ExtGIn(C,D). This shows that the relative cohomology functor of complexes is balanced. Some induced exact sequences concerning relative cohomology groups are considered.