BUDAPEST—Ratings agency Moody’s late on Friday raised Hungary’s sovereign credit rating to ‘Baa2’ from ‘Baa3’ on the economy’s strong rebound from the pandemic, which comes as a boon to Prime Minister Viktor Orban amid a campaign for early 2022 elections. Orban, the country’s longest-serving leader since Communist times, faces what could be Hungary’s first tight election in more than a decade. Ramping up his campaign, Orban has showered the electorate with handouts, including a $2 billion income tax rebate for families, waiving income tax for young workers, home renovation grants, and extra pension payments. The nationalist leader has also stepped up his anti-immigration campaign following the Taliban takeover of power in Afghanistan and has grown increasingly radical on social policy to protect what he says are traditional Christian values from Western liberalism. Orban says the strong recovery allows the extra spending, despite calls from the central bank to rein in …