You go through the door into this exhibition and – boom! In front of you is a two-and-a-half-metre square painting in which a colourful pile of naked gods and goddesses, tritons, angels and white-maned hippocamps surges up to bear aloft the coarse-featured, black-bewigged figure of Charles II in Roman military gear, his pink mantle draped across the sky by naked cherubs. It’s breath-taking, and quite absurd: a statement by the imported Italian artist Antonio Verrio of the restored King Charles’s dominion over the oceans, painted a few years after one of England’s most crushing naval defeats, by the Dutch.

Antonio Verrio’s The Sea Triumph of Charles II (1674). Oil paint on canvas 224.5 x 231. The Royal Collection / HM Queen Elizabeth II

It’s a splendid way to introduce the mind-boggling, sometimes sublime, sometimes potty excesses of the European Baroque as it settled in Britain after the horrors of the Civil War and the austerity of Cromwell’s Commonwealth. The first room of the show parades the imagery of Charles himself – the swirling sculptured busts, the grand spaces designed by Verrio for Charles at Windsor, the opulent jewellery and silver, Grinling Gibbons’s virtuoso wood-carving, and an allegory by John Michael Wright (a Scottish Catholic), for the King’s London palace at Whitehall, depicting the return of peace and the arts – all graphically illustrating the symbolic significance of the King’s very person, embodying the nation’s sense of liberation: ‘a new Augustus’.

He surrounded himself with a court that was also an embodiment of those liberties. The next room is awash with gorgeous ladies, their lusciously evoked flesh and shimmering satins effectively set off in this display by warm, dark wall-colours. Many are the work of Peter Lely, who had come from Holland some years earlier and was appointed his personal painter by the King. One seductively smiling portrait, of Barbara Villiers, Duchess of Cleveland, mistress (one of many) to the King, is shown with her son (one of many) as none other than the Virgin Mary with the Christ Child.

Peter Lely, Barbara Palmer, Duchess of Cleveland with her son, probably Charles Fitzroy, as the Virgin and Child c.1664. Oil paint on canvas. 124.7 x 102. National Portrait Gallery, London. Purchased with help from the National Heritage Memorial Fund.

Much more serious are the altarpieces commissioned by Charles’s Catholic Queen, Catherine of Braganza, from the Italian Benedetto Gennari. Gennari was a cousin of the celebrated Bolognese painter Guercino and owed his prestige to that connection, but he deserves attention on his own account. This exhibition commendably gives him his due. The tension between material splendour and the disciplines of the Christian religion is a theme that runs through the period, influencing the arts as a reflection of contemporary politics.

Benedetto Gennari, The Annunciation 1686. Oil paint on canvas. 255.3 x 210.2. Collection of The John and Mable Ringing Museum of Art, the State Art Museum of Florida, Florida State University, Sarasota, Florida.

It was in architecture that the Baroque in England found its supreme expression. Christopher Wren’s St Paul’s Cathedral, with its obvious derivation from the great churches of Catholic Italy, soared above the city of London, being rebuilt after the 1666 fire. Around it, dozens of churches created a new language of Protestant church-building. Wren’s assistant Nicholas Hawksmoor, continued the theme with extraordinary originality into the eighteenth century, and John Vanburgh applied architectural swagger to secular building in houses like Blenheim, the gift of a grateful nation to the victorious soldier John Churchill, 1st Duke of Marlborough. He also created Castle Howard in Yorkshire, which, says Anthony Geraghty in his catalogue essay, with its central dome has an entrance hall that is “the most complex room of the English Baroque and one of the great spaces of European architecture.”

These themes come together in a display of house portraits, a genre that had come from the Low Countries with landscape painters like Jan Siberechts, portraying not simply a building but its whole economy, with parterres, espaliered walks, kitchen gardens, stables, and the husbandry of the surrounding countryside.

Jan Siberechts, View of Chatsworth 1699-1700. Oil paint on canvas. 315 x 307. The Devonshire Collections, Chatsworth.

The interaction of interior and exterior was explored by artists painting illusionistic views of liminal scenes, on terraces or balconies, or as interiors viewed from outside in the form of detailed trompe-l’oeil rooms seen through an eye-hole in a wall. Trompe-l’oeil, indeed, is revealed unexpectedly as an essential element in the Baroque aesthetic: those illusionistic swags of flowers and fruit carved in lime-wood by Grinling Gibbons have their parallel in the painted trompe-l’oeils of pipe-racks by Edward Collier (actually a Netherlander from Leiden), the flower-pieces of Simon Verelst and Jean-Baptiste Monnoyer, and even the ‘silent companions’ or life-size dummy figures, sometimes portraits of real people, who were commissioned from artists to provide companionship (and perhaps relief from too loquacious company).

Simon Verelst, A Vase of Flowers c.1669-75. Oil paint on canvas. 44 x 32. The Ashmolean Museum, University of Oxford. Bequeated by Daisy Linda Ward.

In 1688 the Glorious Revolution brought over a Dutch King married to a Stuart princess, putting an end to the threat of a Catholic monarchy, and gradually ushering in a form of parliamentary democracy. 1707 saw the Act of Union joining England and Scotland. New artists took centre stage. Godfrey Kneller, who came to England from Lübeck in 1676, painted beauties for Hampton Court, whole-length successors to Lely’s half-lengths. Another set of whole-length beauties were painted for the 6th Duke and Duchess of Somerset at Petworth by a Swede, Michael Dahl. They were long ago cropped to three-quarter length format, but two have been restored for the show as whole-lengths, since the lower portions had been thoughtfully preserved after cutting down. Dahl became the preferred likeness-maker of Queen Anne’s court.

Now emerges the first native English historical and decorative painter, James Thornhill, who rose to the challenge of one of the most ambitious of all interior decorative schemes: the great banqueting hall at Wren’s Greenwich Hospital. Here, on a colossal ceiling and vast walls, British  naval achievements are once again celebrated, and William and Mary the monarchs accorded their apotheosis. These achievements can’t of course appear on the walls of the exhibition, but there is a good selection of Thornhill’s lively drawings and oil studies. Likewise there are modelli  by Verrio for the Heaven Room at Burghley, by the Huguenot Louis Chéron for Boughton, and by Louis Laguerre, another Frenchman, for the staircase at Petworth. On the more intimate scale of portraiture, an artist like John Closterman could group children with style and charm to create a lively and decidedly ‘Baroque’ ensemble – more convincing, in fact, than his opposite numbers in Amsterdam.

John Closterman, The Children of John Taylor of Bifrons Park 1696. Oil paint on canvas. 189.8 x 271.8. National Portrait Gallery, London

This golden efflorescence was perhaps inevitably superseded by a calmer moment: the onset of democracy and a swelling middle class brought in a less swashbuckling aesthetic. Kneller’s north German and Dutch training equipped him well to reflect the seriousness of the age of Addison and Steele; his portraits for the Kit-Cat Club, which grew out of the social life of the new coffee-houses, established a standard format of head and shoulders, including hands, of male figures in sober attire. They are serviceable rather than swagger; but Kneller’s picture of the poet Matthew Prior, with its spare brushwork and informal portrayal of the man, wigless but with enormous dignity, is one of the great portraits of the age. The exhibition ends with a surprise: a large group portrait of the members of the Whig Junto by an altogether unknown painter, John James Baker. It has been recently acquired by the Tate. As we’d expect, it’s downbeat, sober, a presentation of serious politicians in conclave: despite its considerable size, it looks forward to the small-scale conversation-pieces that were to be popularised by William Hogarth and became a familiar genre for most of the new century.

John James Baker, The Whig Junto 1710. Oil paint on canvas. 319 x 395. Tate. From the collection of Richard and Patricia, Baron and Baroness Sandys. Accepted by HM Government in Lieu of inheritance tax and donated to Tate in 2018.

This magnificent exhibition is accompanied by a very odd catalogue: the exhibits are listed perfunctorily without numbering, and without giving the birth and death dates of the artists. Nowhere in the book are such dates given – unless in passing in one of the contributors’ essays. Given that the period it covers is one generally neglected by museums – as the catalogue admits, “this is the first-ever in Tate’s history” – these omissions are a serious shortcoming.