Starburst galaxies and galaxy clusters are predicted extragalactic gamma-ray sources. Starburst galaxies exhibit in localized regions enhanced rates of supernovae, the remnants of which are believed to accelerate cosmic rays. Recently the H.E.S.S. collaboration has reported the detection of gamma rays - tracers of such cosmic rays - from the starburst galaxy NGC 253. Galaxy cluster can accumulate cosmic rays which are accelerated within them over the Hubble time. Consequently they are expected to host a significant population of such relativistic particles. Several galaxy cluster have been searched with H.E.S.S. for gamma-ray emission. However only upper limits on such emission could be obtained. The results and implications of these gamma-ray observations of starburst galaxies and galaxy cluster will be presented in this talk.