"They were making out," said the shocked onlooker, who added that based on their behavior, it seemed like the longtime pals are "totally a couple."
The "Roar" singer and the actor were part of a big group who shared a "festive" late-night dinner at the trendy restaurant on Friday night.
In the past, the duo have denied they're anything more than friends.
"He's my bud, I'm like his big sister," Katy told Elle UK in 2013. "We just hang out. The other day, I said, 'One of the things I'm most proud of is not sleeping with you, Robert.' And that's true."
But in August 2017 — as Rob's relationship with FKA Twigs, to whom he was engaged from 2015 to mid-2017 — began to wind down, the alleged buddies were seen getting their flirt on during a group dinner at the Sunset Tower hotel in Hollywood.
According to E!, Rob and Katy sat next to each other and were "flirting" and "laughing" throughout the meal.
"Katy and Robert were extremely affectionate the entire time at Sunset Tower," an onlooker told E! "She was resting her head on his shoulder, and Robert had his arm around her at the dinner table. Katy kept glaring at Robert while smiling and laughing. They looked like they were dating."
The witness also described a smoke break the stars took together: "He held Katy close to his side as they walked out and they stayed out there for about 20 minutes. They were cozying up and lounging together while outside," said the onlooker. "He definitely wasn't acting engaged, and there was no mention of FKA twigs the entire dinner. Everyone assumed Katy and Robert were together."
After their flirty night out, a source dished to E! about the duo, who "have been good friends for a while."
"They have many mutual friends and have always kept in touch. They aren't serious as of now, but Rob has always had an interest in Katy," said the source.
"They talk on the phone regularly and make sure to see each other when they both aren't away working. Katy has always been a good friend to Rob over the years and has been there for him emotionally," said a source.
"They have many common interests and also both know how to have fun and party," continued the insider. "Although they have been flirtatiously romantic, they have still remained good friends. Rob loves that Katy is a free spirit and she has given him good advice when it comes to relationships."
Concluded the E! source, "Since Katy has been busy on tour, her and Rob will FaceTime and text when possible. She wants to make sure he is doing OK. Rob knows how good of a friend she is and he was also there for her when she was going through her divorce. They lean on each other."