My strategy for doing this is to find an existing database that associates reactions/e.c. numbers to sequences, and BLASTP against the protein sequences from those databases and transfer the annotations from the hit to the query. Keep in mind that there are many reactions that don't have an EC number, or that have an ambiguous EC number (Alcohol dehydrogenase, 126.96.36.199 is a good example of an ambiguous EC number), so if your goal is to associate catalyzed reactions with sequences, it may be worth your while to go a bit beyond using just EC numbers.
Here are some ideas of databases to work from (to actually get the peptide sequences and EC-number/reaction associations requires a bit of coding):
Expasy Enzyme: Associates EC numbers with Uniprot IDs. In their downloads section is a text file called "enzyme.dat" which contains these associations, as well as some other useful data. The number of proteins referenced by Enzyme is considerably smaller than the total number of proteins in UniProt (or SwissProt). So to speed searches, and ensure that your top hits are annotated, you may want to BLAST against subset of UniProt containing only those proteins referenced by Enzyme. PRIAM is a command line tool that is fairly easy to use, and automates the process of annotating a proteome based on Expasy Enzyme (the only hiccup I ran into when getting it to work is that it requires an out of date version of BLAST to be installed).
Rhea: An extensive database of metabolic reactions. Many of the reactions (I think including some that don't have an EC number) are associated with UniProt accessions. They have lots of different options for downloading the data. The most convenient for your purposes may be to get "rhea2ec.tsv" and "rhea2uniprot.tsv" from the TSV section of their downloads page. Like with Enzyme, it would probably be best to search against a subset of UniProt.
Metacyc: Metacyc is similar to Rhea in a lot of ways. It has lots of reactions and lots of annotations. It's a great database to use, but there are a couple caveats: 1. you need to register to download the files, 2. The data are organized hierarchically and split into multiple different files, so it takes a while to understand the way they organize the data and writing a program to extract sequence-reaction associations is not trivial.
I've used all of these databases and find that the EC numbers they assign are usually the same as those that Blast2GO assigns. So, depending on the goals of your project, the effort required to get significantly better annotations than those provided by Blast2GO may not be worth it.