Recently, Gorenstein dimensions relative to a semidualizing module have been the subject of numerous studies with interesting extensions of the classical homological dimensions. Although all these studies share the same direction, a common basis, and similar final goals, there is no common framework encompassing them as parts of a whole, progressing, on different fronts, towards the same end. We provide this general and global framework in the context of abelian categories, standardizing terminology and notation: we establish a general context by defining Gorenstein categories relative to two classes of objects ((X,Y)-Gorenstein categories, denoted G(X,Y)), and carry out a study of the homological dimensions associated with them. We prove, under some mild standard conditions, the corresponding version of the Comparison Lemma that ensures the consistency of a homological-dimension theory. We show that Ext functors can be used as tools to compute these G(X,Y)-dimensions, and we compare the dimensions obtained using the classes G(X) with those computed using G(X,Y). We also initiate a research of the global dimensions obtained with these classes G(X,Y) and find conditions for them to be finite. Finally, we show that these classes of Gorenstein objects are closely and interestingly related to the Foxby classes induced by a pair of functors. Namely, we prove that the Auslander and Bass classes are indeed G(X,Y) categories for some specific classes X and Y.