I know that the electric field points from positive to negative potential in a circuit but it is opposite inside a battery for the purpose of continuity of electron flow and electric field....but why is it so?? I mean on a chemical level of the cell why is the field generated opposite? What reaction is behind it ?
Just to make the description easier let us suppose that the only mobile charges are positive and the battery is not connected to an external circuit.
Within the battery which has two terminals $A$ and $B$ an electro chemical reaction is occurring which moves positive charges from terminal $A$ to terminal $B$.
This means that terminal $B$ gains a net positive charge and terminal $A$ gains a net negative charge.
This in turn means that within the battery an electric field is set up which has a direction from the positive terminal $B$ to the negative terminal $A$.
As more positive charges migrate from the negative terminal $A$ to the positive terminal $B$ due to the electrochemical reaction the strength of the electric field within the battery increases, and as this electric field is opposing the migration of the positive charges from the negative terminal to the positive terminal the rate of charge migration decreases.
The migration of electric charges eventually stops when the forces produced by the electrochemical reaction are balanced by the forces due to the electric field within the battery.
When this occurs the potential difference across the terminals of the battery is constant and there is no further migration of positive charges within the battery.
The consequences is that the electric field within a battery is directed from the positive terminal to the negative terminal.
Connecting the battery to a complete external circuit will have the result that positive charges will move from the positive terminal of the battery along the external circuit and finish up at the negative terminal of the battery where they will migrate within the battery from the negative terminal to the positive terminal under the influence of the electrochemical reaction in order that the potential difference across the battery is maintained.