Akinfenwa, 28, was a free agent after failing to agree a new deal at Sixfields, where he scored 17 goals in 40 League Two appearances last season.
He was on the verge of move to Southend but the Essex club were forced to pull out of the deal on account of Akinfenwa's wage demands.
The well-travelled striker, who is set do make his Gills debut in Thursday's friendly with Hearts, began his career with Watford before starring for Lithuanian outfit FK Atlantas.
Team news: Shrimpers hit by flu
His return to Britain featured spells at five clubs during the 2003/04 season including Rushden and Leyton Orient.
Akinfenwa then netted 14 times for Torquay in 2004/05 before scoring the winner for Swansea in the 2006 Football League Trophy final. His stint with Northampton began in 2008 and produced a total of 39 goals.
Team news: Southend missing Mohsni
Team news: Prosser pushing for start