In simplest words flailing means struggling. As per the question, Britain's flailing economy means the struggling economy which needed to be revived from the newfound wealth. Taking another example of the word as a verb, flailing about in an attempt to swim that person hit his head on something hard. In this sentence, the individual found it hard to swim and therefore got injured.