She is one of the most popular paintings in the National Gallery, whose rather unfortunate looks inspired illustrations for Lewis Carroll's Alice's Adventures in Wonderland. But one question has always puzzled: did the poor lady really look like this?

Today the Guardian can reveal that she did and was suffering from an exceptionally rare form of Paget's disease - an abnormality of the metabolism that enlarges and deforms the bones.

The portrait, An Old Woman, painted by the Flemish artist Quinten Massys in 1513, is popularly known as The Ugly Duchess and will be part of the National Gallery's eagerly awaited exhibition Renaissance Faces: Van Eyck to Titian, which opens next Wednesday.

Curators are particularly excited about this painting because two important discoveries have been made in recent research: firstly, the portrait is truthful and she almost certainly looked like that, and secondly, a long held historical theory that the painter was copying Leonardo da Vinci is wrong.

The medical research shows that she was suffering from an advanced form of Paget's disease - osteitis deformans - which enlarged her jaw bones, extended her upper lip and pushed up her nose. It also affected her hands, eye sockets, forehead, chin and collarbones.

"This woman must have been very, very unfortunate," said Michael Baum, emeritus professor of surgery at University College London who, with his student Christopher Cook, investigated the portrait.

"I've always been intrigued by this painting. It's fascinating because it is so meticulously and lovingly painted. You think, why would someone go to so much trouble in order to paint such a grotesque image? I always suspected there was something more to it than just a study in grotesquery."

Baum regularly takes medical students on his "National Gallery ward round" and gave Cook the task of proving his Paget's disease theory. "He did the most meticulous research, I gave him top marks. It was a beautiful piece of work, utterly convincing."

Paget's disease is named after Sir James Paget, the British surgeon who first described it in the late 19th century, and more commonly affects the lower body such as the pelvis and femur. When it does affect the skull it is normally just the cranium so the woman - whoever she is - was suffering from a particularly rare form. "I have certainly never seen a full-blown case like this," said Baum. In all probability, the condition would have happened later in life so she may even have been a beauty before the condition set in. Aside from the effect on her looks, she may have suffered no more than headaches and a damaged pituitary gland, said Baum.

Baum is also convinced that the sitter would have been "a very powerful woman and may even have been a real duchess". He said: "I reckon the artist was paid a princely sum to do it because who is going to buy a painting like that? Artists had to make a living. I think the painting is probably quite a close likeness."

It remains one of Baum's favourites. "You either love it or you hate it and I love it, it's part of the background of London, part of London's iconography."

The other research is important in an art historical context. Experts have often written about how similar the Massys painting is to two Leonardesque drawings that are supposed to reflect a lost original by Leonardo from about 1490. The assumption has been that Massys imitated the works but the National Gallery research suggests that this was not the case. Susan Foister, curator of Renaissance Faces, said: "We can now say with confidence that Leonardo - or, at least, one of his followers - copied Massys's wonderful painting, not the other way around. This is a very exciting discovery."

Foister said they had discovered that Massys made amendments as he went along, suggesting he was making a study from close quarters. Also, in the two Leonardo copies, the forms of the body and clothes are oversimplified and the woman's left eye is not in its socket.

"It was always assumed that a lesser known northern European artist would have copied Leonardo and it has not really been thought that it could have been the other way round," said Foister. She added that both artists were known to be interested in ugliness and exchanged drawings "but credit for this masterful work belongs to Massys".

Foister is less convinced that the woman was necessarily a powerful noblewoman but said it could not be ruled out and she welcomed the debate. "He must have spotted this unfortunate old lady and chose her as the perfect model to paint from the flesh."

The painting - one of the most popular in the National Gallery, according to Foister - inspired Victorian illustrator John Tenniel to make the Duchess (the unpredictable, Cheshire Cat-owning baby abuser) one of the most grotesque characters in his illustrations of the Lewis Carroll classic.

Massys painted The Old Woman as part of a pair. The other, The Old Man, is being lent to the National Gallery and will hang alongside The Old Woman for the first time in 150 years.

Rather unfairly from the duchess's point of view, the exhibition will include portraits of some of the prettiest and most porcelain-skinned women painted, including Palma Vecchio's La Bella. The Ugly Duchess may not have been a beauty but, as Foister points out, "it is a beautiful painting".

• Renaissance Faces: Van Eyck to Titian, National Gallery, October 15-January 18