Magnetism plays a key role in modern science and technology, but still many open questions arise from the interplay of magnetic many-body interactions. Deeper insight into complex magnetic behaviour and the nature of magnetic phase transitions can be obtained from, for example, model systems of coupled XY and Ising spins. Here, we report on the experimental realization of such a coupled system with ultracold atoms in triangular optical lattices. This is accomplished by imposing an artificial gauge field on the neutral atoms, which acts on them as a magnetic field does on charged particles. As a result, the atoms show persistent circular currents, the direction of which provides an Ising variable. On this, the tunable staggered gauge field, generated by a periodic driving of the lattice, acts as a longitudinal field. Further, the superfluid ground state presents strong analogies with the paradigm example of the fully frustrated XY model on a triangular lattice. A quantum gas trapped in an optical lattice of triangular symmetry can now be driven from a paramagnetic to an antiferromagnetic state by a tunable artificial magnetic field.