The TLDR: Base accuracy of the guillotine OHKO is 30%, only affected by moves in after gen I & II. Difference in level between user and target affects accuracy from gen II and beyond.
More in-depth explanation:
Gen I: OHKOs are affected by accuracy/evasion stats, but auto fail if user's Speed stat is lower than targets (X Accuracy guarantees a hit)
Gen II: OHKOs auto fail is target is higher level than user's. The accuracy increases a small amount for each level the user is above the target. (X Accuracy guarantees a hit)
Gen III & Beyond: OHKOs auto fails when user is lower leveled than target. Accuracy and evasion stats do not affect OHKOs but the accuracy still goes up by a small amount for each level the user is above the target.
OHKO accuracy is not affected by: Wide Lens or abilities (With the exception of "No Guard")
OHKO are affected by moves like "Lock-On" and "Mind Reader"
This info is from Bulbapedia. A great resource to check before posting or waiting for answers to questions. :D