The 30-year-old arrives at Priestfield as Gareth Ainsworth’s fourth summer signing, joining James Brophy, Zane Albarus and Will Goodwin.
Gordon made 57 appearances and scored twice during his two-year spell at Motherwell. Before that, he enjoyed a successful nine-year stay with St Johnstone, making 201 appearances and helping the club secure both the Scottish Cup and Scottish League Cup in 2020/21.
“When Gillingham came knocking it was a move that really interested me,” he told club media.
“After speaking with the manager and the rest of the coaching staff I came away with a great feeling about the place.
“I am delighted to be here.”
