The only woman with a leading role in The Merchant of Venice is Portia, who, in her most significant scene, is impersonating a man. The other two women in the play are Nerissa, Portia's servant who acts as her shadow, and Jessica, who defies the authority of her father in order to submit to the authority of her husband.
Portia lives in an ambiguous position. Her wealth theoretically gives her power, but the terms of her father's will deprive her of agency in choosing a husband. Bassanio, though he comes to love her, initially describes her as a prize to be won. As soon as he mentions her name he compares Portia to her famous namesake, but the Roman Portia was principally known for being the daughter of Cato and the wife of Brutus, not for anything she achieved on her own account. It is thus, as a passive model of virtuous womanhood, that we first encounter Portia.
However, Portia does manage to master not only her fate but those of Bassanio, Antonio and Shylock, even if she has to disguise herself as a man to do so. Having shown the disadvantages under which the women are placed, Shakespeare finally depicts Portia and Nerissa getting the better of Bassanio and Gratiano in a battle of wits. The battle is not serious and part of its purpose may be to end on a lighthearted note after the very real humiliation of Shylock. However, Bassanio and Gratiano end the play at least temporarily beholden to the women they are to marry, while Portia and Nerissa's quick wits place them in a commanding position.
Shakespeare clearly intends to emphasize the women's abilities by doing this. In the interests of verisimilitude, it would have been perfectly natural to assign them to the subservient role they occupy at the beginning of the play, but their final triumph of agency and intelligence is a matter of choice for the dramatist.