There are two methods that you can use to earn gil quickly - the legitimate way or through using cheats.
The easiest and most efficient method to earn gil is to sell Mastered Materia - Materia that has been leveled up to the maximum allowable level. The best Materia to sell for this purpose is a Mastered All Materia.
You get several All Materia throughout the game which makes it relatively easy to sell one or two once they are fully leveled. A new Materia is born once you fully level one of them up which means that you can move on to leveling up the next Materia as soon as you’ve mastered one. You can keep a rotation going so that you don’t waste AP.
A Mastered All Materia sells for 1,400,000 gil.
Note that there is a limit on the amount of Materia that you can have in your inventory. Few players will run into this limit, as you can hold up to 200 Materia at any given time (which excludes Materia equipped to characters), but for Completionists or those stocking up for experimentation purposes, etc. you should be aware of this unlisted limit.
Once you reach this limit and new Materia that you recieve will randomly replace Materia that you had in your inventory.
The easiest way to earn gil if you are comfortable using cheats it to utilize the W-Item Materia item duplication trick. Check out the Cheats section for more information. You can then sell the items that you duplicate.