There was a “pointedness” about the exchange between the two tabloid editors, Ambi Sitham, a media lawyer, said.
Ms Sitham was giving evidence at the trial of former News of the World and Sun editor Brooks, 45, on phone hacking and other allegations.
Ms Sitham, speaking by videolink from the US, said she was at a birthday dinner party in a steak restaurant in Balham, London, for another former News of the World editor, Andy Coulson, who is also a defendant in the trial, in January 2003.
She was with her then-boyfriend, a publicist, who was a close friend of Coulson, 45.
She said Morgan and Brooks were both very busy.
“At the time they were both editors of quite big national tabloid newspapers, and they were both very busy trying to finish off the last details of their front covers, or splashes, for their newspapers. They were engaged in some banter about their respective front covers.
“Piers said to Rebekah that he already knew what her splash was going to be. He said, ‘I already know what your splash is, or your cover is, because I’ve been listening to messages’.”
Asked by prosecutor Andrew Edis QC how Brooks responded, Ms Sitham said: “She retorted, ‘Been hacking into my phone again, have you, Piers?’
“He said something like, ‘Well you’ve been looking at my e-mails’ or something. It was quite a quick back and forth of bantering, I just know what I heard.
“It was her saying to him, ‘You’ve been listening to my messages’, he said, ‘You’ve been looking at my e-mails’, and her saying ‘I’ve left a false trail, I’ve led you up the garden path’.”
Asked how they appeared, she said: “It was pointed. There was a pointedness to it.”
Ms Sitham said she worked as a solicitor for law firm Schillings in London from 2000 to 2005 and was involved in helping people take legal action against media outlets.
There were 18 to 20 guests at the dinner, who were sitting at a long, narrow table. She was sitting next to Brooks and opposite Morgan, while TV presenter Claudia Winkleman was also there. Ms Sitham knew who Brooks was, but had not met her before. She had met Morgan previously, but not Coulson.
She had been involved in the case of supermodel Naomi Campbell against The Mirror, and Morgan and Ms Sitham discussed the case.
Brooks was “very lovely and very welcoming and very nice”.
She added: “She said we should keep in touch and swap details so if there were cases in future, we could try and settle it a bit more amicably.”
Earlier, the trial heard that the News of the World found out that Prince Harry’s then girlfriend Chelsy Davy was bombarding him with calls and texts when he was training at Sandhurst in Berkshire.
The royal editor of the now-defunct tabloid, Clive Goodman, sent an e-mail to then-editor Coulson in August 2005 saying she was blitzing him with calls.
In the e-mail, Goodman wrote: “He’s not allowed to use his mobile at Sandhurst until he’s off duty but she’s blitzing him with dozens of calls and texts when he should be concentrating on his training.”
Harry could only field the calls when he had finished his training duties at 10pm, the e-mail said.
Brooks, Goodman and Coulson are among eight defendants in the trial. All deny the charges.