KANSAS CITY -- On Salute to the Negro Leagues Day at Kauffman Stadium, the can-do spirit of the late Buck O'Neil was prevalent.

Kansas City residents can vouch for the fact that O'Neil always considered the glass half full instead of half empty. The Royals took that same approach on Sunday with an improbable 11-10 comeback victory over the Giants. Trailing 6-0 and 10-3, with Cy Young candidate Tim Lincecum on the mound it looked gloomy indeed for Kansas City in the early going. But the Royals refused to roll over and wound up tying for the second-biggest comeback win in franchise history.

The Royals managed to get Lincecum out of the game with a high pitch count (109) after five innings and then proceeded to punish the San Francisco bullpen. Hot-hitting Mike Aviles tied the game at 10 with a two-run double in the sixth and Joey Gathright produced the game-winning hit with an RBI single in the seventh off left-hander Alex Hinshaw.

The last time Kansas City overcame a seven-run deficit to win was June 8, 2006, against the Texas Rangers. The largest comeback win in club history was nine runs.

"It was a tough game today, but we stuck together as a team," Gathright said. "That last at-bat, I was just trying to stay inside the ball and put it in play. They got way up on us today, but it was still early. We knew we had a lot of game left."

The Royals began to build some serious momentum by pounding away at reliever Keiichi Yabu, who entered in the sixth with a 10-5 lead. Yabu faced four batters and surrendered four hits. Before the Giants could get out of the inning, the entire cushion was gone.

Gathright said it was particularly meaningful for him to get the game-winning hit on Salute to the Negro Leagues Day.

"I was talking about it with [Mark] Teahen in the weight room," Gathright said. "It's special to do it on this day. Anytime it's great to get a game-winning hit, but this was really fun to have it happen today."

Royals starter Kyle Davies, who came into the game with a 1.46 ERA since his promotion from Triple-A Omaha, had trouble locating his offspeed pitches down in the strike zone and found himself headed for the showers after just 1 1/3 innings.

Davies surrendered six hits and five runs and saw his ERA jump to 3.12.

"I just couldn't put guys away after getting two strikes," Davies said.

The Giants appeared to be in cruise control after racking up seven hits and four runs against long man Jeff Fulchino. But when Lincecum allowed two runs in his final inning of work, the Royals felt the window of opportunity was open.

"We just kept battling back," Aviles said. "It was just a matter of not folding and continuing to take it to them."

Ron Mahay continued his stout setup work with two scoreless innings and Joakim Soria got his 20th save in 21 tries. But it took a stellar defensive play by Aviles at shortstop to end the game. After Randy Winn's two-out single in the ninth, Bengie Molina scorched a grounder headed for left field. Aviles made a diving stop and knew he had time to throw out the slow-footed Molina.

The Royals (33-43) have won four consecutive series against the National League and are 9-3 in Interleague Play.

"The thing I was real proud of was that we got [Lincecum's] pitch total up there," Royals manager Trey Hillman said. "Once it was 10-5, the talk in the dugout was that we had the momentum, even being down five runs."

Kansas City continued to produce quality at-bats until it had amassed 14 hits and six walks. Overcoming a seven-run deficit without the aid of a homer required focus and concentration up and down the batting order.

"We never quit from a mental mind-set," Hillman said. "We knew we would see both their left-handers [Jack Taschner and Hinshaw] out of the bullpen, but our left-handed hitters did a good job in key situations of taking some pretty good swings. We got the big hits when we needed them."

Seven runs down in the fifth? No time to mail it in.

It was the kind of comeback victory that would have made Buck O'Neil smile.