Detective Chief Inspector John Caldwell from the PSNI’s Major Investigation Team was was shot several times by two masked men in Omagh on February 22.
DCI Caldwell sustained life-changing injuries in the attack, which happened in front of his young son.
The New IRA later claimed responsibility for the murder bid and has since vowed to continue its terror campaign.
A video posted on social media shows Mr Sunak leaving Altnagelvin Hospital in Derry after visiting DCI Caldwell and his family on Wednesday.
The PM was seen leaving the hospital and driving off in a fleet of black Range Rovers.
The meeting came after the Mr Sunak held talks over coffee with US President Joe Biden at Belfast’s Grand Central Hotel just a few hours earlier.