Arrays of imaging atmospheric Cherenkov telescopes (IACTs), such as VERITAS and the future CTA observatory, are designed to detect particles of astrophysical origin. IACTs are nominally sensitive to gamma rays and cosmic rays at energies between tens of GeV and hundreds of TeV. As such, they can be used as both direct and indirect probes of particle acceleration to very high energies.
Recent measurements by VERITAS of the cosmic ray electron and iron spectra are discussed. Such observations probe the activity of nearby sources, and may shed light on acceleration mechanisms and on propagation effects. In addition, gamma rays can be used to study ultra high energy cosmic rays (UHECRs), by directly observing their sources. Gamma ray bursts (GRBs) have been proposed as possible UHECR accelerators. More specifically, low-luminosity GRBs are emerging as leading candidates. A new study on the detection prospects for such events with CTA is presented.