The government said the deal would make it easier for food and drink to be imported and exported by reducing paperwork and checks.
Some routine checks on animal and plant products will be removed completely, the government said.
In return, the UK will give the EU access to its fishing waters until 2038 - a 12-year extension of arrangements already in place.
One diplomatic source said it amounted to a rollover of the existing terms agreed as part of the revised withdrawal agreement negotiated by former Prime Minister Boris Johnson's government in 2019.
The text of the deal says: "We note the political agreements leading to full reciprocal access to waters to fish until 30 June 2038 and extending energy cooperation on a continuous basis."
The post-Brexit deal on fishing rights, which gave EU boats continued access to UK waters, was set to expire at the end of June 2026.
The UK government has also unveiled a £360m investment fund in coastal communities and the fishing industry.
Fishing only accounts for an estimated 0.04% of UK GDP, but British control over its fishing waters was a big issue in the Brexit campaign.
Defending the agreement, Sir Keir said it would allow British fishing communities to "sell more easily into the European market" and give them "stability over the long term".
Reform UK leader Nigel Farage said the 12-year deal on access for European boats "will be the end of the fishing industry".
Liberal Democrat leader Sir Ed Davey said the prime minister "must ignore the naysayers and dinosaurs in Reform and the Conservative Party and be more ambitious in getting the best deal in the national interest".
Conservative leader Kemi Badenoch said giving the EU access to British waters for 12 years "was three times longer than the government wanted".
"We're becoming a rule-taker from Brussels once again," she said.
The deal requires the UK to follow rules set by Brussels in areas covering food trade, emissions trading and potential co-operation in the electricity market.
Known as dynamic alignment, this arrangement would mean the UK giving the European Court of Justice a role in any trading disputes.
In a post on X, Johnson said under this "sell out of a deal the UK will have to accept EU law on a host of measures from food standards to emissions trading".
He said Sir Keir had agreed that the UK "will once again be paying countless millions of pounds into EU coffers - for the privilege of becoming the non-voting punk of the EU Commission".
The prime minister's spokesperson said payments to the EU in relation to the deals on agricultural products and energy were "not big", but not did confirm the costs.
The government said there was a difference between these "administrative costs" and the payments required to be part of EU programmes, which would be part of future negotiations.