Wrexham moved back into the Championship's top six as they came from 3-2 down to beat automatic promotion hopefuls Ipswich Town 5-3 at Stok Cae Ras.