We derive the Landau-Lifshitz-Bloch (LLB) equation for a two-component magnetic system valid up to the Curie temperature. As an example, we consider disordered GdFeCo ferrimagnet where the ultrafast optically induced magnetization switching under the action of heat alone has been recently reported. The two-component LLB equation contains the longitudinal relaxation terms responding to the exchange fields from the proper and the neighboring sublattices. We show that the sign of the longitudinal relaxation rate at high temperatures can change depending on the dynamical magnetization value and a dynamical polarisation of one material by another can occur. We discuss the differences between the LLB and the Baryakhtar equation, recently used to explain the ultrafast switching in ferrimagnets. The two-component LLB equation forms basis for the largescale micromagnetic modeling of nanostructures at high temperatures and ultrashort timescales.