Natalie Jones, 33, hoped to "make her friends jealous" with a seaside snap in St Ives, on Cornwall's north coast.
But the "perfect" moment at Porthgwidden beach was ruined when a gull suddenly swooped down to take a bite out of Miss Jones' pasty.
Miss Jones, from Glasgow, said: "Just as I went to take the picture I felt something on my head."
She was "amazed" to find the picture captured the "microsecond" when the gull struck and showed its "really vicious claws and the beak embedded into the pasty".
The gull managed to fly away with a beak full of pasty and Miss Jones discarded the rest.
The civil servant was unhurt but said the incident "could have been quite serious".
St Ives has had repeated problems with gulls stealing food and the town council has previously drafted in hawks and falcons to tackle the scavenging birds.
Linda Taylor, Mayor of St Ives, said the problem of gulls was worsened by people feeding the birds.
She said: "Some people still think it's amusing to throw food on the floor and watch seagulls descend like the Alfred Hitchcock film [The Birds]."
Signs have been put up around St Ives warning the public to protect their food when eating outside.
A gull has been caught on camera as it swooped to steal a Cornish pasty from a woman's hand.