Labourer Stephen Rowley, from Macclesfield, suffered burns to his face, neck and both arms at Egerton Youth Club on Mereheath Lane in Knutsford on 18 September 2009.
His employer, Paul Leonard, was prosecuted by the Health and Safety Executive (HSE) following an investigation into the cause of the explosion.
Macclesfield Magistrates' Court heard Mr Leonard had been hired to repair a septic tank, and had arranged for a trench to be dug out to gain access.
Mr Rowley was using a power tool in the trench to remove damaged pipework from the tank, when the digger operator struck an underground pipe containing liquid petroleum gas (LPG). Sparks from the power tool set alight the leaking gas and created a fireball in the trench.
Mr Rowley's clothes were set on fire and he had to struggle out of the trench and then roll in the grass to put out the flames. The court was told Mr Leonard had left the workers unsupervised when the gas pipe was struck.
The HSE investigation found that Mr Leonard had failed to consider that gas pipework might be present, and did not ensure the gas supply was isolated before starting work. He also failed to provide trench supports and there was no means of access, such as a ladder, to get in and out of the trench.
Paul Leonard was found guilty of a breach of the Construction (Design and Management) Regulations 2007 after he failed to plan, manage and monitor the construction work safely.
Mr Leonard, 43, of Heyden Close in Macclesfield, was fined £2,500 and ordered to pay £3,500 in prosecution costs on 4 November 2011.
Speaking after the hearing, the investigating inspector at HSE, Catherine Willars, said: "Stephen Rowley could easily have been killed in the gas explosion. Luckily he has now been able to return to work, following lengthy treatment as a result of his injuries.
"He should never have been told to carry out work in a trench without proper safety precautions being put in place. He was working near a tank containing liquid petroleum gas, which was likely to have underground gas supply pipes.
"What made it worse was that Mr Rowley had to struggle out of the badly-supported trench by himself to put out the flames, as Paul Leonard was not present when the explosion occurred."