I found the proof for
rank($A$) = rank($A^T \cdot A$) , A $\in \mathbb{R}^{n \times p}$
once here, Prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$ , and also in the wikipedia entry.
I work with a $3200x10$ matrix $A$ in Matlab which gives me rank($A) = 10$. However, Matlab return rank($A^T \cdot A)=5$, i.e., rank($A$) $\neq$ rank($A^T \cdot A$). The entries $A_{ij}$ are in the order of $1e-6$ to $1e-9$.
Is it possible that the matrix is so poorly conditioned that the above relation does not hold, or might there be other reasons?