Q:

What’s the difference between ‘After having failed’ and ‘Having failed’? 

Having failed to wake up his wife, he put a ladder against the wall. 
After having failed to wake up his wife, he put a ladder against the wall. 

What the difference between them? 

A:

Both are reduced adverbial clauses.  Your second sentence is incorrect.  
It should be: (after) failing to wake up his wife, he put a ladder against the wall. 
There are three types of reduced adverbial clauses.  Different rules exist for reducing each type of adverbial clause.  The common rule is that subject in adverbial clause and main clause must be same. 
1.  Reducing adverbial time clause (while/after/before/since/whenever/as soon as/when)
1.  drop the subject after 'while/after/before'
2.  change verb to 'verb-ing' form
For example: 
While/after/before/whenever/when/as soon as I walked/was walking in the park, I did not use my mobile phone.  
Reduced: (while) walking in park, I did not use my mobile phone. 
Use of while is optional.  You can keep or drop while.  Also, 'be' verb can be dropped in case of 'while'. 
Reduced: after/before/whenever walking in park, I did not use my mobile phone. 
Unlike while, subordinating conjunction 'before', 'since' and 'whenever' must be kept in reduced clauses.  Use of 'since' is similar, it usually requires perfect tense in main clause.  You can, however, drop 'after', but the reduced form must be changed to 
Reduced: having walked in park, I did not use my mobile phone.  
Both 'as soon as' and 'when' changes to 'upon'
Reduced: upon walking in park, I did not use my mobile phone. 
2.  Reducing adverbial contrast clause (although/though/even though/while)
Just remove subject and covert verb to 'verb-ing'.  Keep the conjunction. 
Although/though/even though/while he was skinny, he fought bravely in the war. 
Reduced: conjunction + (being) + skinny, he fought bravely in the war. 
3.  Reducing adverbial cause/effect clause (since/because)
While reducing this type of adverbial clause, drop conjunction 'since' or 'because' and convert verb to 'verb-ing' form.  E.g.:
a) Because he failed to wake up his wife, he put a ladder against the wall
Reduced: failing to wake up his wife, he put a ladder against the wall. 
b) Because he had failed to wake up his wife, he put a ladder against the wall
Reduced: having failed to wake up his wife, he put a ladder against the wall. 
General rule for all type of reduced adverbial clauses: 'be' verb becomes 'being' and it can be dropped if meaning is still clear. 
So, you can see that all 'after' and 'because/since' produce similar reduced form in some cases:
Reduced: having failed to wake up his wife, he put a ladder against the wall. 
The original sentence can be:

Because/since he (had) failed to wake up his wife, he put a ladder against the wall
After he (had) failed to wake up his wife, he put a ladder against the wall

This form shows that the time sequence of both events are sequential and separated in time (not simultaneous). 
If reduced sentence is: failing to wake up his wife, he put a ladder against the wall. 
The original sentence can only be: because/since he (had) failed to wake up his wife, he put a ladder against the wall

