Buildup factors for gamma rays traversing slab shields have been obtained using the Monte Carlo method. Secondary particles produced inside the shield were taken into account, with special attention given to the contribution of bremsstrahlung which is produced by electrons and positrons. The results indicate that annihilation gamma rays from pair production do increase the buildup factor a little, but that the bremsstrahlung contribution is much more pronounced. The contribution of bremsstrahlung to the dose buildup factor reaches 33% of its total value for 8-MeV gamma rays traversing 5 mean-free-paths of lead. For single-material shields, the results agree well with the experiment. For double-material shields, comparison with experiment is not possible due to the lack of such data.