Gillingham have won the hotly contested race to sign highly rated 24-year-old former Championship midfielder Kyle Dempsey.