Drugs and stomach surgery should be used to help some adults and children lose weight, say experts.
The UK is second only to the USA for obesity levels
The National Institute for Health and Clinical Excellence has issued guidelines on treating obesity and preventing people becoming overweight.
NICE says the NHS in England and Wales needs support from local authorities, schools and employers.
A quarter of England adults are obese, costing £3.7bn a year. It causes more harm than smoking, alcohol or poverty.
A Department of Health report published in August predicted a third of adults and a fifth of all children under 15 will be obese by 2010.
Professor Jim McEwen, who chaired the guideline group, said the recommendations would outline what treatments should be offered but also aim to prevent people becoming overweight in the first place.
NICE said local authorities should create safe places for people to walk and cycle and children to play.
And buildings and spaces should be designed to encourage people to be more physically active, for example by making it easy to take the stairs instead of the lift.
Schools and nurseries should help children to eat a healthy diet and employers should put in place policies to encourage healthy lifestyles such as providing showers and secure cycle parking.
For adults who are overweight (body mass index 25 to 29.9) or obese (BMI 30 or greater), they should first be helped to make long-term changes to their diet and exercise habits.
People can calculate their BMI by dividing their weight in kilos by the square of your height in metres.
But if attempts to lose weight fail, more extreme measures such as weight loss drugs or surgery should be considered.
Surgery should be a last resort for adults with a BMI of 40 or more or between 35 and 40 if they have a significant disease such as diabetes which would improve if they lost weight.
In people with a BMI over 50, surgery can be carried out as a first-line treatment.
However, NICE admitted that access to surgery was currently "patchy".
Surgery can also be considered in "exceptional circumstances" in children with a BMI over 40 who have gone through puberty and all other attempts to lose weight have failed.
Drug treatment should only be used in children if they also have a life-threatening condition such as sleep apnoea.
The guidance is the first from NICE to include recommendations for professionals outside the health service.
It is also the first time specific guidance has been published for the public - the advice includes how to eat a healthy diet and keep physically active.
NICE clinical and public health director Professor Peter Littlejohns said: "Obesity is the most serious threat to the future health of our nation.
"Ultimately the guideline is around how we change people's perception and how we change patients' behaviour. For the first time we have brought together all the people that can help solve the obesity problem - not just health professionals."
Professor John Wilding, professor of medicine at University of Liverpool and member of the guideline development group, admitted that as offering anti-obesity drugs and surgery in extreme cases to children would be seen as controversial.
But he added: "It is right that the NHS is given the go-ahead to take radical action when faced with such a major threat to the health of our children."
Professor Mayur Lakhani, chair of the Royal College of GPs, said: "The NHS is too conservative in tackling obesity in the UK.
"As practising GPs we need to be like Rottweilers in attacking obesity to stem the epidemic of chronic diseases."
Shadow health secretary Andrew Lansley said money to tackle obesity must be ring-fenced.
He blamed government inaction over the last decade for rising obesity levels.