The striker has signed a 2½-year contract, and could make his debut on Saturday when City take on 3rd-placed Tranmere at Prenton Park.
The size of the transfer has not been disclosed, but it is a "significant six-figure fee." Birmingham City, who let Fagan join Colchester on a free transfer in the summer, take a 30% cut because of a sell-on clause.