The Hungarian defender came to replace Glen Loovens after the Dutchman left for Celtic. He signed for City last August and after a little while has made himself No.1 choice to partner Roger Johnson in the City defence.
"It was my dream when I came here to earn a new deal and now this has come true," Gyepes told the club website.
"I am really excited and happy signing the new deal."
The man he replaced, Darren Purse, is less happy. Purse covered for Gyepes on Sunday when Gabor missed the Swansea game through suspension but there's been no new offer for Purse who is feeling a bit miffed.
"When I came to the club four years ago it was my dream to lead Cardiff out at the new stadium," said Purse in the South Wales Echo.
"Obviously that will not be the case now as nobody has had the decency to even talk to me about my future.
"I feel let down that nobody has said a word to me. I think I've deserved more than that.
"In January I was offered a two-and-a-half year contract with Norwich, but because Cardiff didn't get another centre-half in I had to stay put. But come July I'm unemployed.
"I'm proud to have been a Cardiff City player, but this has left me in limbo and I don't think that's fair.
"It just leaves a sour taste in your mouth when you're still the club captain and not a word is said."
It's expected that Gyepes will get his place back at Purses expense for tonight's game against Derby.