We construct the homotopy pullback of $A_n$-spaces and show some universal property of it. As the first application, we review the Zabrodskys result which states that for each prime $p$, there is a finite CW complex which admits an $A_{p-1}$-form but no $A_p$-form. As the second application, we investigate $A_n$-types of gauge groups. In particular, we give a new result on $A_n$-types of the gauge groups of principal $mathrm{SU}(2)$-bundles over $S^4$, which is a complete classification when they are localized away from 2.