In this note we study finite $p$-groups $G=AB$ admitting a factorization by an Abelian subgroup $A$ and a subgroup $B$. As a consequence of our results we prove that if $B$ contains an Abelian subgroup of index $p^{n-1}$ then $G$ has derived length at most $2n$.