Cardiff, however, battled back, with scrumhalf Tomos Williams winning a frenetic chase to steal in under the posts early in the second half.
A Garyn Smith try briefly gave Cardiff the lead, but Gloucester bullied their way over the line for a pushover try shortly afterwards to go 27-23 in front and a Billy Twelvetrees penalty extended their lead to seven.
Yet Blaine Scully struck back for Cardiff with a late try, and Anscombe, who missed a difficult conversion, made no mistake with a penalty in the dying moments to complete a remarkable comeback.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
(Reporting by Philip O'Connor; Editing by Toby Davis)
