J.J. Frazier scored 26 points and Gaines had 23 while leading the defensive effort on Stefan Moody and Georgia beat Mississippi 80-66 on Saturday.
Frazier and Gaines combined to make 10 of 18 3-pointers.
"I just feel like I played desperate," Gaines said. "That was kind of the team motto."
Yante Maten had 19 points and 10 rebounds for Georgia (15-12, 8-8 Southeastern Conference), which ended a three-game losing streak. Perhaps most disturbing was the most recent loss at Auburn, tied for 12th in the league.
"Our spirit was down because I think they felt our (NCAA) bubble burst, and maybe it has," said Georgia coach Mark Fox.
Moody, guarded by Gaines must of the game, was held to 15 points, including 10 in the second half. He fouled out with 1:45 remaining. Moody, who leads the SEC with his average of 23 points per game, has 19 games with at least 20 points.
Fox questioned his team's effort at the start of Wednesday's loss at Auburn and was happy with the response against the Rebels.
"We talked a lot today about playing with determination and I was pleased with our team's effort," Fox said.
Anthony Perez led Ole Miss (18-11, 8-8) with 19 points and nine rebounds. The Rebels suffered a damaging loss to their NCAA tournament hopes.
"The seniors' season is right there on the line, and their effort was greater than ours," said Perez of the Bulldogs. "That's why they won the game."
Georgia took a 38-34 advantage in rebounds.
"They really had a lot of second chances and third chances," Perez said.
Three early 3-pointers from Gaines helped Georgia lead 25-13. The Rebels charged back with a 16-2 run that included 13 unanswered points for a 29-27 lead. The Bulldogs missed seven straight shots before recovering with 3s from Gaines and Frazier for a 33-32 halftime lead.
Moody, defended closely by Gaines and unable to break out in the first half, launched back-to-back 3-pointers to get untracked early in the second half. Another 3-pointer from Martavious Newby gave the Rebels their big lead at 49-41.
Georgia answered with an 11-0 run for a 52-51 lead. Moody was called for a push-off offensive foul during the run.
A 3-pointer by Rasheed Brooks cut the Georgia lead to 60-58 before Frazier's 3-pointer capped seven straight points for a 67-58 advantage.
Mississippi: The Rebels committed 14 turnovers, including four by Moody, that led to 22 points for Georgia. ... Moody made only two of six shots for five points in the first half and was 5 of 13 for the game. ... Newby limped off the court after being called for an offensive foul with about eight minutes remaining. ... Moody had 29 points in the Rebels' 72-71 home win over Georgia on Jan. 9.
Georgia: Former Georgia coach Hugh Durham returned for a basketball reunion. Among former players who returned were Willie Anderson, James Banks, Charles Claxton, Rod Cole and D.A. Layne. ... A moment of silence was observed for the late Norm Reilly, who was the former longtime basketball sports information director for the Bulldogs and was the Alabama-Birmingham associate athletic director for media relations when he died earlier this month after a long battle with cancer. Reilly was 56.
Senior forward Tomasz Gielo, from Poland, had 13 points for Ole Miss for his eighth straight game scoring in double figures. Before the run, he had gone seven straight games below 10 points. Gielo made two 3-pointers.
HELP FOR GAINES
Gaines had 12 points in the first half and had more help from Frazier and Maten in the final 20 minutes.
"Kenny was doing a lot of scoring by himself early on and I told him that Yante and I were going to help him," Frazier said. "He was carrying a load, defensively guarding Moody and coming back and leading us offensively. I just wanted to take some pressure off him."
Mississippi hosts Mississippi State on Wednesday night.
Georgia plays at South Carolina on Thursday night.