The origin of successive phase transitions observed in the layered perovskite $alpha$-Sr$_2$CrO$_4$ is studied by the density-functional-theory-based electronic structure calculation and mean-field analysis of the proposed low-energy effective model. We find that, despite the fact that the CrO$_6$ octahedron is elongated along the $c$-axis of the crystal structure, the crystal-field level of nondegenerate $3d_{xy}$ orbitals of the Cr ion is lower in energy than that of doubly degenerate $3d_{yz}$ and $3d_{xz}$ orbitals, giving rise to the orbital degrees of freedom in the system with a $3d^2$ electron configuration. We show that the higher (lower) temperature phase transition is caused by the ordering of the orbital (spin) degrees of freedom.