The Royal Academy's mesmerising Degas and the Ballet begins and ends with the artist himself: dark-eyed and wary at the door in a lifesize photograph, half-blind in a tantalising film in the final room. In between are more than 40 years of ballet dancers shifting through a thousand different positions, depicted from every angle, in one ever-changing performance. Yet it is not the dancers but the artist one seeks to hold fast, to grasp the mystery and greatness of his work.

Degas (1834-1917) began visiting the ballet of the Paris Opera in his 40s. Thirty years later, when he had long since made the subject his own, an American collector asked: "Why, monsieur, do you always do ballet dancers?" Degas flashed back: "Because, madame, it is all that is left us of the combined movements of the Greeks." The aphorism appears barbed until one considers that in ballet Degas found an inexhaustible source for his modern classicism with its emphasis on the body. But nor is the question as obtuse as it seems.

For why does Degas keep returning to the backstage hiatus and the weary rehearsals, to the waiting, watching, struggling and straining, to the laborious practice that eventually makes perfect? Convention, abetted by popularity, insists that this is the winsomely traditional side of his art, all those graceful ballerinas flitting across the stage in swan's-down and tulle. But consider how rarely he depicts a full-dress performance.

As if to make the point, the curators have positioned the Courtauld's Two Dancers on the Stage at the start of the show. The painting is justly famous for its ballerinas quivering en pointe in the limelight, shoes shining, tutus gauzy, roses blossoming in their hair. It is an image to spur a million girls to ballet on a winter's day, but it stands in contrast to almost everything that follows.

Degas's dancers are shown scratching their backs, hauling up their bodices, slumping exhausted on the floor. Beginners wait, old hands sprawl, lessons repeatedly stall. There are classes without teachers, rehearsals in which nobody moves, bare rooms in which stretching alternates with inaction, where one girls sits head in hands while the scene rakes to her distant companions awaiting instruction. It is remarkable how few dancers actually dance.

Ballet is an art of perfection, but Degas shows the workings, the ceaseless studying involved; the analogy with his own art is self-evident. Just as he depicts every fractional repositioning of the foot, every degree of bodily torsion from all round and in every medium – pencil, pastel, charcoal, chalk, paint, print and even wax – to get at the truth, so his dancers keep rehearsing to perfect their performance.

And how staggeringly radical he is from first to last. In The Rehearsal (1874), for all its diaphanous tutus and fetching arabesques, the scene is sharply cropped on one side like a snatch of half-heard conversation, while a spiral staircase restricts the viewing on the other. Dancers are seen from behind, so close their limbs are barely in focus or reflected in the mirror as illegible wraiths.

Three Dancers (1903) is built up using pastel and fixative in glowing layers of dot and swipe that resemble Jackson Pollock 50 years in advance. Degas doesn't even confine himself to one kind of mark-making per image. A painting will go many ways – incisive outline, dry stabs, liquid blurs, fingerprints. He will use a soft pastel for something sharply complex, crisscrossing the strokes so that you have to look through them, like traffic, to deduce a figure.

Photographic details are transcribed. Poses are recycled. A single figure repeated and reversed goes to make the mass of forms locked together, like gears in motion, in the Russian Dancers series. Heaven knows how he achieved this feat in fugitive chalk on slippery tracing paper, but that is part of his strangeness.

And Degas is profoundly mysterious. In this respect, the dancers are emblematic: beautiful people, perfect bodies, invitingly ideal forms to many another artist; nothing so facile to Degas.

The crime of popularity yielded to a charge of coldness some years ago. Degas is still portrayed as a heartless taxonomist of human anatomy and the dancers are still cited as evidence: their facelessness, their squat, hunched, splayed and overworked bodies, all observed from inelegant viewpoints.

They are not portraits, to be sure (though recognisable individuals emerge), but nor are they anatomical drawings. Degas isn't analysing the articulation of limbs or the muscle groups involved in each movement so much as the struggle of bodily existence, the drama of being embodied; he is less Leonardo and more Michelangelo.

Movement, the central theme of this show, is investigated with discrimination and insight. Degas's great wax dancers (or their bronze casts) are displayed alongside Muybridge's stop-start photographs of bodies in motion and one sees an affinity: the sculptures as 3D representations of sequential movement. Early films, Parisian panoramas, François Willème's "photo-sculptures" (statues based on multiple shots of sitters in the round, and surprisingly kitsch): all show French art swinging into motion. And yet movement itself is surely not Degas's true subject.

It is in the gallery of his own photographs that the artist comes into new focus (for me) and not just in his well-known portraits of Renoir, Mallarmé and others appearing like visions in a twilight dream. The Royal Academy also presents the rare shots of dancers. Technically flawed, these are aesthetic revelations none the less: the figures oblique and spectral in the gloom, as if trying to escape their own corporeal existence. Degas is already looking for more than the camera can catch.

So it is with this tremendous show, each work imagining the physical life – the inner stress – of the dancer. What it is to balance on one toe or lean precariously close to the floor; what it is to hold a leg at shoulder height or twist until your muscles nearly snap: this is what his images express. Degas goes far beyond observation, as if willing himself into the body of his dancers.

It is said that Degas's art is all climax from the off and so it seems from this show, superbly curated by Richard Kendall and Jill DeVonyar, beautifully designed by Ivor Heal. An early sketch of a child straining to hold a pose carries the same intensity as a late painting of dancers strenuously flexing their limbs and there is always Degas's peerless line, charged with perfect clarity.

But towards the end of his life, he addresses groups of figures with such force that they seem to metamorphose into pure form, something more like the essence of dance. Melting, curving, merging like multi-limbed goddesses in a limelight of violet, sulphur and flame blue, they move towards a vision of the future, towards the pure painting of modern art.

Here, the show itself breaks into motion with the few precious seconds of film captured (without permission) by Sacha Guitry in 1914-15. Degas is seen negotiating a faltering route through crowds in the Boulevard de Clichy, most of his face concealed by a white beard and dark hat. Just as he is getting close enough for you to see his eyes beneath the brim – to see the artist himself – the film expires: Degas is out of sight.