Similar to the phrases “oh boy” or “oh brother”. Used to express worry or contemplation (or conversation filler).
Jill: ‘Jane just passed out’ Bob: “Oh gilly gally”