The 21-year-old started his career with Peterborough United and made his debut as a 16-year-old against Wolverhampton Wanderers in 2012.
Gordon subsequently moved to West Ham United at the end of 2013 and enjoyed loan spells at Chelmsford City, Nuneaton Borough, Sligo Rovers in Ireland and Newport County.
"He is a talented player who has been part of a Premier League club in West Ham and is now very keen to make an impression," Cheltenham manager Gary Johnson told reporters.
"Jaanai has trained with us for a few weeks so we have seen his ability and when he became available we were delighted to secure his services.
"He is quick and a strong forward who is determined to take on a new challenge with us."
Cheltenham have not disclosed the length of Gordon's deal.