The prime minister arrived at the cathedral in a black Range Rover and walked up the steps with wife Carrie Johnson to attend the event on Friday.
While a number of people could be heard applauding and cheering as the couple ascended the staircase, others could be heard booing.
The PM was also heckled and booed more as he left the service, with one person saying “f*** off Boris”.
It comes after months of controversy for Mr Johnson and the Tory government following a number of rule-breaking Number 10 parties during lockdown.
Spectator Clement Jacquemin said he booed Mr Johnson as he left the service because “he is a disgrace”.
Mr Jacquemin said Brexit and partygate were behind his objection to Mr Johnson, and said the prime minister should have “stayed home, made himself forgotten, and let the British public enjoy this day”.
Mr Johnson, his wife Carrie, and Chancellor Rishi Sunak all apologised in April after the Metropolitan Police handed them fixed penalty notices (FPNs) for a birthday party for the PM in the Cabinet Room on June 19, 2020.
In her recent report, senior civil servant Sue Gray also found boozy drinks parties were held at the heart of government on April 16, 2021, the eve of the Duke of Edinburgh’s funeral – albeit not attended by the PM himself.
As part of their investigation into lockdown-busting parties in Downing Street and Whitehall, the Metropolitan Police deemed that coronavirus restrictions were breached ahead of the funeral.
However, the force did not specify which events led to fines being received.
At the time, socialising indoors with people from other households was not allowed and meeting others outdoors was limited to groups of six people or two households.
An increasing number of Tory MPs have publicly urged the Mr Johnson to stand down – although not all have revealed whether they have submitted letters to the 1922 Committee calling for a confidence vote to decide his future.
Home Secretary Priti Patel has told Tory MPs pushing for the prime minister to resign to “forget it”, that writing letters of no-confidence in Boris Johnson was a “sideshow”, and the party should be focused on “real challenges that we have to find solutions to”.
This week, the prime minister again came under criticism from the standards watchdog after he refused to give his adviser on the rules for ministers the freedom to launch his own inquiries into potential breaches.