The 27-year-old midfielder, who will officially join the Baggies on July 1, has penned a three-year deal at The Hawthorns.
West Brom also have the option to extend his contract by a further 12 months.
"Craig is someone we have followed for a long time and we are delighted to finally get him," director of football and administration Richard Garlick told the club's official website. "We tried to bring him here in the January transfer window but it did not work out.
"We have continued to track him and he has expressed a real desire to be at this club following interest from elsewhere."
Gardner leaves Sunderland following a three-year spell at the Stadium of Light.