Dan,
The spouse of an EU national who is exercising treaty rights in the UK i.e. employment or self employment is also entitled to remain in the UK even if they themselves are not EU nationals such as your case. The EU national should apply on Form EEC1 for an EU residence permit and include you in it as a dependent. A residence permit is often issued with 5 years validity.
Likewise an EU national who has been exercising said treaty rights for 4 years is entitled to have their residence permit endorsed with Indefinite Leave To Remain by applying on Form EEC2. Any dependents can be inlcuded in the application and will also get ILR irrespective of their length of stay in the UK although they would have to be physically present in the UK.
Your wife can apply for an EU residence permit retrospectively and for ILR at the same time i.e. simultaneous submission of form EEC1 and EEC2. She has to show evidence of economic activity in the last 4 years by way of payslips, P60 Income Tax and NI contributions certificates, Income Tax returns and/or letters from her employer. You would also have to submit a marriage certificate, your passport/ travel document, her passport/ national identity card and proof of funds/ accomodation.
EU law excludes as a dependent a spouse where the marriage is entered into as a 'convenience' to circumvent national immigration laws. Usually the burden of proof is with the Home Office so they rarely bother in EU applications and will grant the relevant residence permits/ ILR without further enquiries. However IMHO given your immigration history and that the marriage is very recent expect your application to be investiagted into in some detail potentially including a home visit and interviews by the Immigration Service. The Home Office must make a decision on your case within 6 months. I would use a lawyer or immigration consultant experienced in EU immigration law (so he/she can quote case law as applicable) for this one. Make sure anyone offering you immigration advice/ service is registered with the
Office of the Immigration Services Commissioner or is otherwise exempt.
Good Luck