We perform first-principles density functional calculations to investigate the effects of Al incorporation on the p-type Schottky barrier height (phi(p)) and the effective work function for various high-k/metal gate stacks, such as TiN/HfO2 with interface Al impurities, Ti1-xAlxN/HfO2, and TiAl/TiN/HfO2. When Al atoms substitute for the interface Ti atoms at TiN/HfO2 interface, interface dipole fields become stronger, leading to the increase of phi(p) and thereby the n-type shift of effective work function. In Ti1-xAlxN/HfO2 interface, phi(p) linearly increases with the Al content, attributed to the presence of interface Al atoms. On the other hand, in TiAl/TiN/HfO2 interface, where Al is assumed not to segregate from TiAl to TiN, phi(p) is nearly independent of the thickness of TiAl. Our results indicate that Al impurities at the metal/dielectric interface play an important role in controlling the effective work function, and provide a clue to understanding the n-type shift of the effective work function observed in TiAl/TiN/HfO2 gate stacks fabricated by using the gate-last process