The Northern Ireland international achieved a clean sweep of Albion's player-of-the-year awards this season.
He joined West Brom in the summer of 2011 and has formed an impressive partnership with Jonas Olsson in the centre of defence.
Manager Steve Clarke said: "I'm absolutely delighted the deal has been done.
"The fact Gareth has signed it tells you it is a good deal for him - and it is certainly a good deal for the club. He's been a standout performer this season and deserves every reward he gets.
"Gareth's important to the dressing room. I've mentioned a number of times how strong the dressing room is and how we have a lot of good characters in the dressing room. Gareth is one of those.
"He's important to the club and squad - both on and off the pitch."