A search for gravitinos produced in e±p collisions is performed using the H1 detector at HERA. The data were taken at a centre-of-mass energy of 319 GeV and correspond to an integrated luminosity of 64.3 pb−1 for e+p collisions and 13.5 pb−1 for e−p collisions. If R-parity is not conserved, the t-channel exchange of a selectron can produce a neutralino, which, in models where the gravitino is the lightest supersymmetric particle, subsequently decays into a photon and a light gravitino. The resulting event signature, which involves an isolated photon, a jet and missing transverse energy, is analysed for the first time at HERA. No deviation from the Standard Model is found. Exclusion limits on the cross section and on R-parity-violating Yukawa couplings are derived in a Gauge Mediated Supersymmetry Breaking scenario. The results are independent of the squark sector. Neutralinos and supersymmetric partners of the left-handed electron with masses up to 112 GeV and 164 GeV, respectively, can be ruled out at the 95% confidence level for R-parity-violating couplings λ′ equal to 1, in some parts of the parameter space of the considered model.