Check out Ensembl's Biomart interface. You can take an organism like the mouse and ask for all its genes, grab GO terms, genomic location, Entrez ID, whatever you want. Uuse no filter, and in the Attributes panel GO are in the External category. You can even grab orthologous genes from Panther afterwards, if you want different species.
However, 'similar sequences' is a loose term, as Istvan Albert writes. Two protein sequences can only have ~20% identity and yet code for homologous proteins (roughly the same structure and function). It is much worse for the genomic sequence as the genetic code is redundant. You can also have multiple variants depending on species or subunits (think about all the variations on hemoglobins).
The usual way is to consider protein domains, as it is more relevant. Note that two proteins can still share the same type of domain but have quite different biological process GO terms, especially if you are looking at proteic complexes with lots of subunits. The only term you can use is molecular function.
There are also tools like HMMER, who uses a training set of proteins to build a hidden markov model. It can then score protein queries for similarity with you training set. It works by definition as a function prediction machine learning algorithm.
More generally, think about the problem of de novo annotation: you have a new genome, and you want to find all the genes and what they do. There are lots of different methods and approaches that can be used, but they often rely on comparing your new gene models to existing ones and attributing them the same function.
Thank You!, I tried Ensembl's Biomart interface. It has almost all data needed but I want the sequences information and GO annotations to be in the same dataset. I can get GO annotations and homologs separately but not for same genes/ gene ids(genebank or entrez)