A Labour spokesman said Sir Keir was "delighted" that "she hopes to accept the role subject to the normal procedures".
But allies of Boris Johnson reacted with anger to the news.
Former minister Jacob Rees-Mogg said Ms Gray's Partygate conclusions now looked "like a left-wing stitch up".
"So much for an impartial Civil Service, the Gray report now looks like a left-wing stitch up against a Tory prime minister," the former business secretary and Brexit opportunities minister tweeted.
Ms Gray herself has yet to comment.
A Cabinet Office spokesperson said: "We can confirm that Sue Gray has resigned from the post of Second Permanent Secretary in the Department for Levelling Up, Housing and Communities (DLUHC). This was accepted by the department Permanent Secretary and Cabinet Secretary with immediate effect.
"We will not be commenting further on individual personnel matters. We are reviewing the circumstances under which she resigned."
Under the civil service code, officials of Ms Gray's seniority must wait a minimum of three months before taking up outside employment.
The move will be scrutinised by the anti-corruption watchdog, the Advisory Committee on Business Appointments (Acoba), which will advise the prime minister on whether the move is "unsuitable".
Rishi Sunak will make a final ruling, but does not have the power to block an appointment.
Ms Gray went from an influential but little-known arbiter of conduct in government to a household name.
Her report on the Partygate scandal last year contributed to Mr Johnson's downfall as prime minister, prompting numerous Conservative MPs to call on him to resign.
She criticised "failures of leadership and judgment" in No 10 and said "the senior leadership at the centre, both political and official, must bear responsibility".
Separately, Mr Johnson received one of 126 fines issued by the Metropolitan Police while it investigated gatherings in Downing Street and Whitehall.
Hearings in an inquiry by the Commons Privileges Committee into opposition claims Mr Johnson misled MPs about what he knew about the lockdown gatherings in government buildings are expected to begin in the coming weeks.
Other key allies of Mr Johnson have been quick to comment.
Former Culture Secretary Nadine Dorries tweeted that Ms Gray's reported move to Sir Keir's office was "not surprising".
"Whilst writing report, she used QC who tweeted out pro Labour anti gov [government] tweets whilst Alistair Campbell heaped praise upon her. Her comms [communications] assistant briefed against Johnson from day 1.
"The Gray report was a stitch up of PM and CSs [civil servants]," she said.
Bassetlaw MP Brendan Clarke-Smith said he was "genuinely shocked", and accused Sir Keir of having "scant regard for the public image of the civil service and the damage this will do".
"After the events of last year, people will quite understandably be questioning the appropriateness of this appointment, including issues of impartiality," he added.
Former civil servant Alex Thomas, who now works for the Institute for Government think tank, said the move would be "difficult for the civil service", giving its "critics a stick".
"Tricky development for those defending impartiality," he added.