The UK Foreign Office, which advises on which countries are invited for a state visit, says Qatar is a key defence partner and that trade between the UK and the gas-rich Gulf state is worth £6.6bn per year, with £40bn of Qatari investment in the UK economy.
Qatar has been a mediator in talks over the conflict in Gaza, though the role was suspended last month.
And the country's Emir has been a regular visitor to the UK, coming here at least eight times in the past decade. He studied at school in the UK and attended Sandhurst military academy.
There have been calls for a peaceful protest against the visit by the Peter Tatchell Foundation, which has criticised Qatar's record on LGBT rights, women's rights and the treatment of migrant workers.
Human Rights Watch has said the state visit should not ignore Qatar's "troubling rights record".
In response, the UK government says it regularly discusses human rights with its Qatari counterparts and is opposed to discrimination on grounds of sexual orientation or gender.
The Qatari royals will receive a ceremonial reception and military inspection, followed by a carriage parade to Buckingham Palace.
The Princess of Wales will be part of the horse-drawn procession, taking part in a state visit for the first time since ending the chemotherapy treatment that followed her cancer diagnosis.
She will join a private lunch at the Palace, along with the King, Queen and other senior royals.
The Qatari visitors will be brought to Westminster Abbey and the Houses of Parliament, where the Emir will speak to representatives of the House of Commons and House of Lords.
The centrepiece of such state visits is the state banquet, where the King and Emir will give speeches in front of dignitaries from both countries, in the grand setting of the Buckingham Palace ballroom.
The Princess of Wales won't be at the banquet but it will be the first time Sir Keir will have been at this diplomatic showcase as prime minister.
A Foreign Office spokesman said: "Our strong, historic ties with Qatar are vital to UK prosperity, growth and security. The UK government is committed to continued strong relations with Qatar to deliver partnerships of mutual value."