In her televised address, the monarch described meeting the Manchester attack survivors in May as a "privilege" and she praised emergency services workers who put their lives at risk saving others.
"I describe that hospital visit as a 'privilege' because the patients I met were an example to us all, showing extraordinary bravery and resilience," she said.
A framed photograph of Ms Markle and fiance Prince Harry was displayed with other family pictures as the monarch spoke, and the couple also featured in video footage aired at the end of the festive broadcast.
In an apparent reference to the couple's wedding next May, and the Duke and Duchess of Cambridge's baby, expected in April, the Queen said this Christmas her family "...look forward to welcoming new members into it next year".
The Queen also reflected with humour on milestones in her own life, from celebrating her 70th wedding anniversary in November, to the Duke of Edinburgh's decision to step down from solo public duties.
She said: "I don't know that anyone had invented the term 'platinum' for a 70th wedding anniversary when I was born. You weren't expected to be around that long.
"Even Prince Philip has decided it's time to slow down a little, having, as he economically put it, 'done his bit'."
"Home" was the theme of his year's Christmas message, recorded at Buckingham Palace, and she highlighted how the "powerful identities" of London and Manchester had shone through in the face of "appalling attacks" this year.
Footage was shown of the Queen meeting teenage survivors of the suicide bombing which killed 22 people when an attacker detonated an explosive device as fans left a Manchester Arena concert by US singer Ariana Grande.
The Queen was shown at Royal Manchester Children's Hospital chatting to Millie Robson, 15, from Co Durham, and her mother, Marie, and Evie Mills, 14, from Harrogate, and her mother Karen, and father Craig.
London suffered the Westminster Bridge attack in March, which claimed the lives of four pedestrians and a police officer, and there were eight more deaths when three terrorists in a vehicle ploughed into pedestrians on London Bridge then went on a knife rampage in Borough Market in June.
"And here in London, who can forget the sheer awfulness of the Grenfell Tower fire?" said the Queen, as footage was shown of the monarch and Duke of Cambridge meeting emergency services workers close to the site of the inferno which claimed 71 lives.
The Queen added: "Our thoughts and prayers are with all those who died and those who lost so much; and we are indebted to members of the emergency services who risked their own lives, this past year, saving others."
Surrounding the Queen in the palace's 1844 room, where the broadcast was recorded, were family photos including pictures of her great grandchildren Prince George and Princess Charlotte, as well as Meghan and Harry.
The photograph of the prince and his fiancee, and their video footage, were from the day of their engagement announcement in November.
Ms Markle, who is spending Christmas at Sandringham with Harry and other senior royals, is likely to have watched the Queen's message with members of the monarchy.
Her appearance in the Queen's end of year address to the nation is another sign of how quickly she has been accepted into Britain's most prominent family.
There were lighter moments in the message, such as when the Queen referred to how she had changed compared to her first televised Christmas address, which was broadcast live in 1957 from the Long Library at Sandringham.
Black and white footage of the historic broadcast was screened, showing a youthful 31-year-old monarch talking about the medium of television.
The Queen, now white-haired and aged 91, and wearing an ivory white dress by Angela Kelly and a star-shaped diamond brooch, said: "Six decades on, the presenter has 'evolved' somewhat, as has the technology she described."
She said Philip's decision to step back from solo public duties would not diminish his enjoyment: "But I know his support and unique sense of humour will remain as strong as ever, as we enjoy spending time this Christmas with our family and look forward to welcoming new members into it next year."
The broadcast, produced by Sky News, ended with a video montage showing all the senior royals including the Prince of Wales and Duchess of Cornwall, William and Kate on their European tour with their children, and Philip doffing his bowler hat during his final solo engagement at Buckingham Palace.
The message ended as it had begun with a performance by the Commonwealth Youth Orchestra and Choir, and the Queen's closing words reflected her faith: "It is Jesus Christ's generous love and example which has inspired me through good times and bad."