Cardiff wrapped up an emphatic victory with two second-half tries from Ben Blair and a breakaway score from Ceri Sweeney before Tom Shanklin's converted effort brought up the half-century.
Victory at Twickenham completed a memorable week for the Blues, who last weekend beat French giants Toulouse to reach the Heineken Cup semi-finals for the first time in their history in any guise.
Among the most satisfied onlookers at Twickenham will have been Lions head coach Ian McGeechan and his assistant Shaun Edwards.
The Lions management will meet on Monday to finalise their tour squad for South Africa and Cardiff were carried to victory by a number of immense performances from key contenders.
Halfpenny proved his qualities as an electric finisher and Shanklin produced another top-class performance but it was lung-bursting performance from man of the match Martyn Williams who epitomised the difference between the two sides.
The one black mark on the afternoon was an injury - reported to be a fractured arm - to scrum-half Jason Spice after just two minutes which threatens to rule him out of the Heineken Cup semi-final against Leicester.
Gloucester managed a first-half try from Mark Foster and a late penalty try but they were a distant second in every area of the game as they slipped to a fourth consecutive Twickenham defeat.