The frontman arrived on Tyneside on Thursday for a medical.
Ba scored seven goals in 13 appearances for West Ham last season after his proposed move from Hoffenheim to Stoke fell through when he failed a medical.
However, the knee problem which so concerned Stoke has cleared up.
Ba would be manager Alan Pardew's second summer signing after French midfielder Yohan Cabaye.