Let $V$ be a finite-dimensional vector space, $\mathcal{A}$ be the abelian category of finitely generated graded modules over the symmetric algebra $S(V)$, and $\mathcal{B}$ be the abelian category of finitely generated graded modules over the exterior algebra $\Lambda(V^*)$. Then the bounded derived categories $\mathcal{D}^b(\mathcal{A})$ and $\mathcal{D}^b(\mathcal{B})$ are naturally equivalent. This is called the Bernstein-Gelfand-Gelfand duality, a particular case of Koszul duality. On the other hand, the homological dimension of $\mathcal{A}$ is equal to $\dim V$, while the homological dimension of $\mathcal{B}$ is infinite.
To obtain a similar example with unbounded derived categories, let $\mathcal{A}^+$ be the abelian category of (infinitely generated) nonnegatively graded $S(V)$-modules and $\mathcal{B}^+$ be the abelian category of nonnegatively graded $\Lambda(V^\ast)$-modules. Here it is presumed that $S(V)$ is graded so that $V$ is placed in the degree $1$, while $\Lambda(V^\ast)$ is graded so that $V^*$ is placed in the degree $-1$. Then the unbounded derived categories $\mathcal{D}(\mathcal{A}^+)$ and $\mathcal{D}(\mathcal{B}^+)$ are equivalent.
UPDATE. I was asked in the comments to provide an example with both homological dimensions being finite. This can be done by yet another modification of the above examples. Pick an integer $n>\dim V$. Let $\mathcal{A}_n$ be the abelian category of finitely generated graded $S(V)$-modules concentrated in the gradings $0\leq i\leq n$. Similarly, let $\mathcal{B}_n$ be the abelian category of finitely generated graded $\Lambda(V^\ast)$-modules concentrated in the gradings $0\leq i\leq n$. Then the homological dimension of $\mathcal{A}_n$ is equal to $\dim V$, the homological dimension of $\mathcal{B}_n$ is equal to $n$, and $\mathcal{D}^b(\mathcal{A}_n)\simeq\mathcal{D}^b(\mathcal{B}_n)$. A similar example with unbounded derived categories can be obtained by removing the finitely generatedness assumption.
All of the above counterexamples presume that $\dim V>0$. The only positive result in the direction of the original question that I can think of at the moment is that if the derived categories of $\mathcal{A}$ and $\mathcal{B}$ are equivalent, and $\mathcal{A}$ has homological dimension $0$, then so does $\mathcal{B}$. Indeed, $\mathcal{A}$ is a semisimple abelian category if and only if $\mathcal{D}^b(\mathcal{A})$ and $\mathcal{D}(\mathcal{A})$ are.